Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window.request_attention() on Windows only flashes the taskbar, which may be hidden #78030

Closed
ghost opened this issue Jun 9, 2023 · 6 comments · Fixed by #78263
Closed

Window.request_attention() on Windows only flashes the taskbar, which may be hidden #78030

ghost opened this issue Jun 9, 2023 · 6 comments · Fixed by #78263

Comments

@ghost
Copy link

ghost commented Jun 9, 2023

Godot version

v4.0.3.stable.official [5222a99]

System information

Windows 11, AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx 2.10 GHz

Issue description

The request_attention () function on Windows only flashes the taskbar, but what if the taskbar is hidden ? In display_server_windows.cpp, FLASHW_TRAY is used, when it might be more appropriate to use FLASHW_ALL which flashes both the caption and the tray.

Steps to reproduce

N/A

Minimal reproduction project

N/A

@AThousandShips
Copy link
Member

Please update your issue title to be more descriptive

@ghost
Copy link
Author

ghost commented Jun 9, 2023

It's stating that the issue is with the request_attention () function that is part of the Window class and an issue on the Windows platform, so what more do you want ?

@AThousandShips
Copy link
Member

AThousandShips commented Jun 9, 2023

so what more do you want ?

No need to be agressive

The title doesn't say what is wrong, just what thing is having an issue, that's not helpful, it'd be like calling an issue about scripts Script has error

Something like:
Window::request_attention() on Windows only flashes the taskbar

@akien-mga akien-mga changed the title Window::request_attention () on Windows. Window::request_attention() on Windows only flashes the taskbar, which may be hidden Jun 9, 2023
@akien-mga akien-mga changed the title Window::request_attention() on Windows only flashes the taskbar, which may be hidden Window.request_attention() on Windows only flashes the taskbar, which may be hidden Jun 9, 2023
@Calinou
Copy link
Member

Calinou commented Jun 9, 2023

What's the behavior on Linux and macOS for comparison? Also, what happens if you use FLASHW_ALL while the window is focused?

@bruvzg
Copy link
Member

bruvzg commented Jun 9, 2023

What's the behavior on Linux and macOS for comparison?

It's causing dock icon to jump, jumping is visible even if dock is hidden.

Screen.Recording.2023-06-09.at.16.48.20.mov

When calling request_attention() from app with keyboard focus, it should not have any effect on both macOS and Windows.

@ghost
Copy link
Author

ghost commented Jun 10, 2023

I wanted to create a plugin that once it had enumerated all search text matches for instance, that the window would flash to indicate all had been enumerated, eg. like Notepad++ does. It shouldn't matter whether the window has the keyboard focus or not because a request for attention can occur for all sorts of reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants