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
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;