Maximised windows ignore/pass through mouse clicks after launching a fullscreen app, if using multiple displays
Steps to reproduce
- Launch a GTK+ application and maximize it
- Start a fullscreen application
- The GTK+ window cannot be interacted with using the mouse anymore as clicks go "through" the window to other windows behind it, however keyboard still works as long as you give the window focus by clicking on it in the taskbar
Version information
Windows 10, 64 Bit, version 1709, latest updates installed
Tested with HexChat (GTK+ 2.x) and gedit (GTK+ 3.x) and various video games as the fullscreen application. I've wanted to try the GTK+ demo application, but I could not find a download link.
GPU is a GTX 970 with the latest drivers
Additional information
This bug looks very similar to this one: https://bugzilla.gnome.org/show_bug.cgi?id=770596 as well as the issues this user on reddit is having: https://www.reddit.com/r/Windows10/comments/7arvb4/cant_interact_with_some_program_windows_after/
I am not encountering this bug with Steam or Discord as suggested, though these applications may have had this bug fixed. I do remember running into a similar issue with IntelliJ, but I cannot reproduce it anymore, so it might have been fixed there too. This leads me to believe that this might be incorrect handling of custom-drawn UIs, given that all these applications use them.
The bug only happens when I have multiple displays connected. Arrangement of the screens does not matter, neither does which screen the GTK+ application is running on.
Moving the GTK+ application to another display and back using keyboard shortcuts fixes the problem (though handling of this keyboard shortcut seems broken in gedit and instead causes the window to be de-maximized, it works fine in HexChat).
I wrote a little test program to call WinAPI's ShowWindow on the GTK+ window in an attempt to fix the problem; the problem is fixed if I call it with SW_MINIMIZE followed by SW_MAXIMIZE (also works if done by clicking on it in the taskbar twice), but not with SW_HIDE followed by SW_SHOW.
Resetting the graphics drivers using ctrl+shift+win+B also fixes the issue.
Setting the environment variable GDK_WIN32_LAYERED to 0 or 1 makes no difference for either GTK+ application.