Replies: 1 comment
-
My bad, I guess this is a well known problem. I suppose one way to solve it is to resize the window when losing focus to ensure it doesn't match up exactly with the dimensions of the screen, and resize it back when focus is regained; another way would be to simply minimize the window on losing focus. Here's a minimum reproducible example. However, there must be a better solution, as other programs (e.g. Blender) appear to be capable of gracefully losing focus without affecting the appearance of the client area...? (Although, I suppose they could all always be drawing with an extra pixel in one dimension at all times when fullscreen?) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When enabling borderless fullscreen on Windows 10, users can switch between virtual desktops with
Ctrl + Super + Left/Right
or with touchpad gestures. If the task view (multitasking view) is opened withSuper + Tab
or with touchpad gestures, or if the taskbar is opened withSuper
, then despite the window losing focus, the contents of the window still fill the whole screen, hiding the taskbar/task view, even if the user then switches to another virtual desktop! Users can work around this by triggeringCtrl + Alt + Del
twice (or once; it's complicated), which will enable the taskbar/task view to be shown above the window until borderless fullscreen is toggled off and back on again.But I imagine this can be extremely frustrating to users who may encounter this. I tried testing out borderless fullscreen on another wgpu + winit project. I thought something was wrong in the way I was handling winit's event loop, but now I'm not so sure, as I was able to (almost*) reproduce this issue with Vello's
with_winit
example by adding the following lines to support toggling borderless fullscreen:(* Vello's example is slightly better-behaved compared to my code, as it only requires a single
Ctrl-Alt-Del
to correct the issue even when the current virtual desktop has remained the same.)However, I observe the correct behavior when running the
fullscreen
example (which doesn't use wgpu).I'm a little baffled by all of this, and I'm not sure if this is even relevant to winit and this is the right place to ask, or if this is an issue with how I (and Vello's example, apparently) use wgpu. Can anyone else reproduce this, or does anyone know of a solution?
Beta Was this translation helpful? Give feedback.
All reactions