mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
GdkWin32: Fix keyboard state for WinPointer input
The dwKeyStates field of the POINTER_INFO structure is always set to 0, no matter what. Use GetKeyState instead. Forward-port of !4327 to GTK4
This commit is contained in:
parent
871685e271
commit
3912d6aba9
@ -271,9 +271,10 @@ winpointer_make_event (GdkDeviceWinpointer *device,
|
||||
y /= impl->surface_scale;
|
||||
|
||||
state = 0;
|
||||
if (info->dwKeyStates & POINTER_MOD_CTRL)
|
||||
/* Note that info->dwKeyStates is not reliable, use GetKeyState() */
|
||||
if (GetKeyState (VK_CONTROL) < 0)
|
||||
state |= GDK_CONTROL_MASK;
|
||||
if (info->dwKeyStates & POINTER_MOD_SHIFT)
|
||||
if (GetKeyState (VK_SHIFT) < 0)
|
||||
state |= GDK_SHIFT_MASK;
|
||||
if (GetKeyState (VK_MENU) < 0)
|
||||
state |= GDK_ALT_MASK;
|
||||
|
Loading…
Reference in New Issue
Block a user