forked from AuroraMiddleware/gtk
eece8a7dd2
Windows WM handles AeroSnap for normal windows on keydown. We did this on keyup only because we do not get a keydown message, even if Windows WM does nothing with a combination. However, in some specific cases it DOES do something - and we have no way to detect that. Specifically, winkey+downarrow causes maximized window to be restored by WM, and GDK fails to detect that. Then GDK gets a keyup message, figures that winkey+downarrow was pressed and released, and handles the combination - by minimizing the window. To overcome this, install a low-level keyboard hook (high-level ones have the same problem as normal message loop - they don't get messages when Windows WM handles combinations) and use it to detect interesting key combinations before Windows WM has a chance to block them from being processed. Once an interesting combination is detected, post a message to the window, which will be handled in due order. It should be noted that this code handles key repetitions in a very crude manner. The downside is that AeroSnap will not work if hook installation function call fails. Also, this is a global hook, and if the hook procedure does something wrong, bad things can happen. https://bugzilla.gnome.org/show_bug.cgi?id=776031 |
||
---|---|---|
.. | ||
rc | ||
bdfcursor.c | ||
cursor.bdf | ||
gdkcursor-win32.c | ||
gdkdevice-virtual.c | ||
gdkdevice-virtual.h | ||
gdkdevice-win32.c | ||
gdkdevice-win32.h | ||
gdkdevice-wintab.c | ||
gdkdevice-wintab.h | ||
gdkdevicemanager-win32.c | ||
gdkdevicemanager-win32.h | ||
gdkdisplay-win32.c | ||
gdkdisplay-win32.h | ||
gdkdisplaymanager-win32.c | ||
gdkdnd-win32.c | ||
gdkevents-win32.c | ||
gdkgeometry-win32.c | ||
gdkglcontext-win32.c | ||
gdkglcontext-win32.h | ||
gdkglobals-win32.c | ||
gdkkeys-win32.c | ||
gdkmain-win32.c | ||
gdkmonitor-win32.c | ||
gdkmonitor-win32.h | ||
gdkprivate-win32.h | ||
gdkproperty-win32.c | ||
gdkscreen-win32.c | ||
gdkselection-win32.c | ||
gdktestutils-win32.c | ||
gdkwin32.h | ||
gdkwin32cursor.h | ||
gdkwin32display.h | ||
gdkwin32displaymanager.h | ||
gdkwin32dnd.h | ||
gdkwin32glcontext.h | ||
gdkwin32id.c | ||
gdkwin32keys.h | ||
gdkwin32misc.h | ||
gdkwin32monitor.h | ||
gdkwin32screen.h | ||
gdkwin32window.h | ||
gdkwindow-win32.c | ||
gdkwindow-win32.h | ||
libwntab32x.la | ||
Makefile.am | ||
makefile.msc | ||
pktdef.h | ||
wintab.h | ||
xcursors.h |