[gtk+] GDK W32: Set is_modifier field in GdkKeyEvent
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GDK W32: Set is_modifier field in GdkKeyEvent
- Date: Sat, 17 Sep 2016 20:24:48 +0000 (UTC)
commit 0274b2c94e3d935632468a09977f7129d83b12f8
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Sat Sep 17 15:13:45 2016 +0000
GDK W32: Set is_modifier field in GdkKeyEvent
This hardcodes Control, Alt and Shift as modifier keys.
https://bugzilla.gnome.org/show_bug.cgi?id=602773
gdk/win32/gdkevents-win32.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 2f397f9..56a51ee 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -2398,6 +2398,9 @@ gdk_event_translate (MSG *msg,
LOBYTE (HIWORD (msg->lParam)) == _gdk_win32_keymap_get_rshift_scancode (GDK_WIN32_KEYMAP
(_gdk_win32_display_get_keymap (_gdk_display))))
event->key.hardware_keycode = VK_RSHIFT;
+ event->key.is_modifier = (msg->wParam == VK_CONTROL ||
+ msg->wParam == VK_SHIFT ||
+ msg->wParam == VK_MENU);
/* g_print ("ctrl:%02x lctrl:%02x rctrl:%02x alt:%02x lalt:%02x ralt:%02x\n", key_state[VK_CONTROL],
key_state[VK_LCONTROL], key_state[VK_RCONTROL], key_state[VK_MENU], key_state[VK_LMENU],
key_state[VK_RMENU]); */
build_key_event_state (event, key_state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]