Add functionality to hide windows from taskbar (Windows only). #99856
+63
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements godotengine/godot-proposals#8467 for Windows.
About property name:
Window flag names seem to be negated (Why?), e.g. "unresizable", "unfocusable".
show_in_taskbar
would break the trend (default value would be true).hide_in_taskbar
is not great, since it works contradictorily tovisibility = true/false
skip_taskbar
is little less descriptive but works intuitively. (CHOSEN)About the approach:
Windows has 3~4 ways to hide/remove/delete a bar from the taskbar.
WS_EX_TOOLWINDOW
extended style. Also changes the appearance of the window, which is not ideal. I have yet to see this style used by Windows itself.WS_EX_NOACTIVATE
extended style. Doesn't change the style, but the window can't be edited or interacted with... except if you activate the window afterwards, sometimes with some undocumented ways like we do currently :^)ITaskbarList
) and delete the tab. Shouldn't have any side effects on window style etc. Seems to be the way most handle this. (CHOSEN)Previous constraints that were removed:
There are currently 2 arbitrary limitations that can be removed if folks find them too restrictive.
Main window can't be hidden. I don't see how this would be useful. Added mainly to avoid people accidentally minimizing all their windows.
Taskbar visibility can't be changed when the window is visible. Again, not sure why anyone would need this. Added because I doubt it would be useful and because I'm too lazy to find out if it is possible on other platforms, and because I don't want to find out what bugs toggling it can cause (the real reason).
Untested on win 10, need help, own machine went kaboom.