Bypass calls to the grab/ungrab functions in gdkinput-win32.c, as they
2002-03-06 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkevents-win32.c (gdk_pointer_grab, gdk_pointer_ungrab): Bypass calls to the grab/ungrab functions in gdkinput-win32.c, as they don't effectively do anything anyway. (build_key_event_state): Set MOD2 bit if key is in AltGr group. (gdk_event_translate): Call _gdk_windowing_window_get_offsets() each time the offsets are used, on the window they refer to, instead of once in the beginning. The window in question might change due to event propagation. (gdk_event_translate): Set key event group to 0 for non-AltGr keys. Do set the SHIFT bit in the key event state also for ISO_Left_Tab. Now backtabbing finally works again. * gdk/win32/gdkunput-win32.c: Minor debugging output change. * gdk/win32/gdkkeys-win32.c (update_keymap): Set VK_TAB mapping to Gdk_Tab and GDK_ISO_Left_Tab, like on X11. (gdk_keymap_translate_keyboard_state): Add similar code as in the non-XKB case on X11 to generate a more correct consumed_modifiers. Add debugging output. (gdk_keyval_name): Use the U+xxxx format for UCS characters encoded as keyvals. Never return NULL, but hex number representation if keyval not in table. * gdk/win32/gdkwindow-win32.c (gdk_window_focus): Call SetFocus(). Doesn't seem to have any harmful effect, and probably is close to what this function is supposed to do. But it didn't fix GtkCombo as I had hoped. (gdk_window_set_type_hint): Don't intern the _NET_WM_* atoms that weren't used and wouldn't have any meaning on Win32 anyway.
This commit is contained in:
parent
2096715583
commit
d0ebbe9d77
34
ChangeLog
34
ChangeLog
@ -1,3 +1,35 @@
|
|||||||
|
2002-03-06 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab,
|
||||||
|
gdk_pointer_ungrab): Bypass calls to the grab/ungrab functions in
|
||||||
|
gdkinput-win32.c, as they don't effectively do anything anyway.
|
||||||
|
(build_key_event_state): Set MOD2 bit if key is in AltGr group.
|
||||||
|
(gdk_event_translate): Call _gdk_windowing_window_get_offsets()
|
||||||
|
each time the offsets are used, on the window they refer to,
|
||||||
|
instead of once in the beginning. The window in question might
|
||||||
|
change due to event propagation.
|
||||||
|
(gdk_event_translate): Set key event group to 0 for non-AltGr
|
||||||
|
keys. Do set the SHIFT bit in the key event state also for
|
||||||
|
ISO_Left_Tab. Now backtabbing finally works again.
|
||||||
|
|
||||||
|
* gdk/win32/gdkunput-win32.c: Minor debugging output change.
|
||||||
|
|
||||||
|
* gdk/win32/gdkkeys-win32.c (update_keymap): Set VK_TAB mapping to
|
||||||
|
Gdk_Tab and GDK_ISO_Left_Tab, like on X11.
|
||||||
|
(gdk_keymap_translate_keyboard_state): Add similar code as in the
|
||||||
|
non-XKB case on X11 to generate a more correct
|
||||||
|
consumed_modifiers. Add debugging output.
|
||||||
|
(gdk_keyval_name): Use the U+xxxx format for UCS characters
|
||||||
|
encoded as keyvals. Never return NULL, but hex number
|
||||||
|
representation if keyval not in table.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_focus): Call
|
||||||
|
SetFocus(). Doesn't seem to have any harmful effect, and probably
|
||||||
|
is close to what this function is supposed to do. But it didn't
|
||||||
|
fix GtkCombo as I had hoped.
|
||||||
|
(gdk_window_set_type_hint): Don't intern the _NET_WM_* atoms that
|
||||||
|
weren't used and wouldn't have any meaning on Win32 anyway.
|
||||||
|
|
||||||
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
||||||
@ -107,7 +139,7 @@ Mon Mar 4 12:43:48 2002 Owen Taylor <otaylor@redhat.com>
|
|||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
||||||
not group * keysyms_per_keycode. (Tor Lillquist)
|
not group * keysyms_per_keycode. (Tor Lillqvist)
|
||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
Remove the hack to fudge the return value for GDK_Tab + Shift
|
Remove the hack to fudge the return value for GDK_Tab + Shift
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
2002-03-06 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab,
|
||||||
|
gdk_pointer_ungrab): Bypass calls to the grab/ungrab functions in
|
||||||
|
gdkinput-win32.c, as they don't effectively do anything anyway.
|
||||||
|
(build_key_event_state): Set MOD2 bit if key is in AltGr group.
|
||||||
|
(gdk_event_translate): Call _gdk_windowing_window_get_offsets()
|
||||||
|
each time the offsets are used, on the window they refer to,
|
||||||
|
instead of once in the beginning. The window in question might
|
||||||
|
change due to event propagation.
|
||||||
|
(gdk_event_translate): Set key event group to 0 for non-AltGr
|
||||||
|
keys. Do set the SHIFT bit in the key event state also for
|
||||||
|
ISO_Left_Tab. Now backtabbing finally works again.
|
||||||
|
|
||||||
|
* gdk/win32/gdkunput-win32.c: Minor debugging output change.
|
||||||
|
|
||||||
|
* gdk/win32/gdkkeys-win32.c (update_keymap): Set VK_TAB mapping to
|
||||||
|
Gdk_Tab and GDK_ISO_Left_Tab, like on X11.
|
||||||
|
(gdk_keymap_translate_keyboard_state): Add similar code as in the
|
||||||
|
non-XKB case on X11 to generate a more correct
|
||||||
|
consumed_modifiers. Add debugging output.
|
||||||
|
(gdk_keyval_name): Use the U+xxxx format for UCS characters
|
||||||
|
encoded as keyvals. Never return NULL, but hex number
|
||||||
|
representation if keyval not in table.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_focus): Call
|
||||||
|
SetFocus(). Doesn't seem to have any harmful effect, and probably
|
||||||
|
is close to what this function is supposed to do. But it didn't
|
||||||
|
fix GtkCombo as I had hoped.
|
||||||
|
(gdk_window_set_type_hint): Don't intern the _NET_WM_* atoms that
|
||||||
|
weren't used and wouldn't have any meaning on Win32 anyway.
|
||||||
|
|
||||||
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
||||||
@ -107,7 +139,7 @@ Mon Mar 4 12:43:48 2002 Owen Taylor <otaylor@redhat.com>
|
|||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
||||||
not group * keysyms_per_keycode. (Tor Lillquist)
|
not group * keysyms_per_keycode. (Tor Lillqvist)
|
||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
Remove the hack to fudge the return value for GDK_Tab + Shift
|
Remove the hack to fudge the return value for GDK_Tab + Shift
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
2002-03-06 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab,
|
||||||
|
gdk_pointer_ungrab): Bypass calls to the grab/ungrab functions in
|
||||||
|
gdkinput-win32.c, as they don't effectively do anything anyway.
|
||||||
|
(build_key_event_state): Set MOD2 bit if key is in AltGr group.
|
||||||
|
(gdk_event_translate): Call _gdk_windowing_window_get_offsets()
|
||||||
|
each time the offsets are used, on the window they refer to,
|
||||||
|
instead of once in the beginning. The window in question might
|
||||||
|
change due to event propagation.
|
||||||
|
(gdk_event_translate): Set key event group to 0 for non-AltGr
|
||||||
|
keys. Do set the SHIFT bit in the key event state also for
|
||||||
|
ISO_Left_Tab. Now backtabbing finally works again.
|
||||||
|
|
||||||
|
* gdk/win32/gdkunput-win32.c: Minor debugging output change.
|
||||||
|
|
||||||
|
* gdk/win32/gdkkeys-win32.c (update_keymap): Set VK_TAB mapping to
|
||||||
|
Gdk_Tab and GDK_ISO_Left_Tab, like on X11.
|
||||||
|
(gdk_keymap_translate_keyboard_state): Add similar code as in the
|
||||||
|
non-XKB case on X11 to generate a more correct
|
||||||
|
consumed_modifiers. Add debugging output.
|
||||||
|
(gdk_keyval_name): Use the U+xxxx format for UCS characters
|
||||||
|
encoded as keyvals. Never return NULL, but hex number
|
||||||
|
representation if keyval not in table.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_focus): Call
|
||||||
|
SetFocus(). Doesn't seem to have any harmful effect, and probably
|
||||||
|
is close to what this function is supposed to do. But it didn't
|
||||||
|
fix GtkCombo as I had hoped.
|
||||||
|
(gdk_window_set_type_hint): Don't intern the _NET_WM_* atoms that
|
||||||
|
weren't used and wouldn't have any meaning on Win32 anyway.
|
||||||
|
|
||||||
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
||||||
@ -107,7 +139,7 @@ Mon Mar 4 12:43:48 2002 Owen Taylor <otaylor@redhat.com>
|
|||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
||||||
not group * keysyms_per_keycode. (Tor Lillquist)
|
not group * keysyms_per_keycode. (Tor Lillqvist)
|
||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
Remove the hack to fudge the return value for GDK_Tab + Shift
|
Remove the hack to fudge the return value for GDK_Tab + Shift
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
2002-03-06 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab,
|
||||||
|
gdk_pointer_ungrab): Bypass calls to the grab/ungrab functions in
|
||||||
|
gdkinput-win32.c, as they don't effectively do anything anyway.
|
||||||
|
(build_key_event_state): Set MOD2 bit if key is in AltGr group.
|
||||||
|
(gdk_event_translate): Call _gdk_windowing_window_get_offsets()
|
||||||
|
each time the offsets are used, on the window they refer to,
|
||||||
|
instead of once in the beginning. The window in question might
|
||||||
|
change due to event propagation.
|
||||||
|
(gdk_event_translate): Set key event group to 0 for non-AltGr
|
||||||
|
keys. Do set the SHIFT bit in the key event state also for
|
||||||
|
ISO_Left_Tab. Now backtabbing finally works again.
|
||||||
|
|
||||||
|
* gdk/win32/gdkunput-win32.c: Minor debugging output change.
|
||||||
|
|
||||||
|
* gdk/win32/gdkkeys-win32.c (update_keymap): Set VK_TAB mapping to
|
||||||
|
Gdk_Tab and GDK_ISO_Left_Tab, like on X11.
|
||||||
|
(gdk_keymap_translate_keyboard_state): Add similar code as in the
|
||||||
|
non-XKB case on X11 to generate a more correct
|
||||||
|
consumed_modifiers. Add debugging output.
|
||||||
|
(gdk_keyval_name): Use the U+xxxx format for UCS characters
|
||||||
|
encoded as keyvals. Never return NULL, but hex number
|
||||||
|
representation if keyval not in table.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_focus): Call
|
||||||
|
SetFocus(). Doesn't seem to have any harmful effect, and probably
|
||||||
|
is close to what this function is supposed to do. But it didn't
|
||||||
|
fix GtkCombo as I had hoped.
|
||||||
|
(gdk_window_set_type_hint): Don't intern the _NET_WM_* atoms that
|
||||||
|
weren't used and wouldn't have any meaning on Win32 anyway.
|
||||||
|
|
||||||
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
||||||
@ -107,7 +139,7 @@ Mon Mar 4 12:43:48 2002 Owen Taylor <otaylor@redhat.com>
|
|||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
||||||
not group * keysyms_per_keycode. (Tor Lillquist)
|
not group * keysyms_per_keycode. (Tor Lillqvist)
|
||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
Remove the hack to fudge the return value for GDK_Tab + Shift
|
Remove the hack to fudge the return value for GDK_Tab + Shift
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
2002-03-06 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab,
|
||||||
|
gdk_pointer_ungrab): Bypass calls to the grab/ungrab functions in
|
||||||
|
gdkinput-win32.c, as they don't effectively do anything anyway.
|
||||||
|
(build_key_event_state): Set MOD2 bit if key is in AltGr group.
|
||||||
|
(gdk_event_translate): Call _gdk_windowing_window_get_offsets()
|
||||||
|
each time the offsets are used, on the window they refer to,
|
||||||
|
instead of once in the beginning. The window in question might
|
||||||
|
change due to event propagation.
|
||||||
|
(gdk_event_translate): Set key event group to 0 for non-AltGr
|
||||||
|
keys. Do set the SHIFT bit in the key event state also for
|
||||||
|
ISO_Left_Tab. Now backtabbing finally works again.
|
||||||
|
|
||||||
|
* gdk/win32/gdkunput-win32.c: Minor debugging output change.
|
||||||
|
|
||||||
|
* gdk/win32/gdkkeys-win32.c (update_keymap): Set VK_TAB mapping to
|
||||||
|
Gdk_Tab and GDK_ISO_Left_Tab, like on X11.
|
||||||
|
(gdk_keymap_translate_keyboard_state): Add similar code as in the
|
||||||
|
non-XKB case on X11 to generate a more correct
|
||||||
|
consumed_modifiers. Add debugging output.
|
||||||
|
(gdk_keyval_name): Use the U+xxxx format for UCS characters
|
||||||
|
encoded as keyvals. Never return NULL, but hex number
|
||||||
|
representation if keyval not in table.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_focus): Call
|
||||||
|
SetFocus(). Doesn't seem to have any harmful effect, and probably
|
||||||
|
is close to what this function is supposed to do. But it didn't
|
||||||
|
fix GtkCombo as I had hoped.
|
||||||
|
(gdk_window_set_type_hint): Don't intern the _NET_WM_* atoms that
|
||||||
|
weren't used and wouldn't have any meaning on Win32 anyway.
|
||||||
|
|
||||||
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
||||||
@ -107,7 +139,7 @@ Mon Mar 4 12:43:48 2002 Owen Taylor <otaylor@redhat.com>
|
|||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
||||||
not group * keysyms_per_keycode. (Tor Lillquist)
|
not group * keysyms_per_keycode. (Tor Lillqvist)
|
||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
Remove the hack to fudge the return value for GDK_Tab + Shift
|
Remove the hack to fudge the return value for GDK_Tab + Shift
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
2002-03-06 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab,
|
||||||
|
gdk_pointer_ungrab): Bypass calls to the grab/ungrab functions in
|
||||||
|
gdkinput-win32.c, as they don't effectively do anything anyway.
|
||||||
|
(build_key_event_state): Set MOD2 bit if key is in AltGr group.
|
||||||
|
(gdk_event_translate): Call _gdk_windowing_window_get_offsets()
|
||||||
|
each time the offsets are used, on the window they refer to,
|
||||||
|
instead of once in the beginning. The window in question might
|
||||||
|
change due to event propagation.
|
||||||
|
(gdk_event_translate): Set key event group to 0 for non-AltGr
|
||||||
|
keys. Do set the SHIFT bit in the key event state also for
|
||||||
|
ISO_Left_Tab. Now backtabbing finally works again.
|
||||||
|
|
||||||
|
* gdk/win32/gdkunput-win32.c: Minor debugging output change.
|
||||||
|
|
||||||
|
* gdk/win32/gdkkeys-win32.c (update_keymap): Set VK_TAB mapping to
|
||||||
|
Gdk_Tab and GDK_ISO_Left_Tab, like on X11.
|
||||||
|
(gdk_keymap_translate_keyboard_state): Add similar code as in the
|
||||||
|
non-XKB case on X11 to generate a more correct
|
||||||
|
consumed_modifiers. Add debugging output.
|
||||||
|
(gdk_keyval_name): Use the U+xxxx format for UCS characters
|
||||||
|
encoded as keyvals. Never return NULL, but hex number
|
||||||
|
representation if keyval not in table.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_focus): Call
|
||||||
|
SetFocus(). Doesn't seem to have any harmful effect, and probably
|
||||||
|
is close to what this function is supposed to do. But it didn't
|
||||||
|
fix GtkCombo as I had hoped.
|
||||||
|
(gdk_window_set_type_hint): Don't intern the _NET_WM_* atoms that
|
||||||
|
weren't used and wouldn't have any meaning on Win32 anyway.
|
||||||
|
|
||||||
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
||||||
@ -107,7 +139,7 @@ Mon Mar 4 12:43:48 2002 Owen Taylor <otaylor@redhat.com>
|
|||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
||||||
not group * keysyms_per_keycode. (Tor Lillquist)
|
not group * keysyms_per_keycode. (Tor Lillqvist)
|
||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
Remove the hack to fudge the return value for GDK_Tab + Shift
|
Remove the hack to fudge the return value for GDK_Tab + Shift
|
||||||
|
@ -1,3 +1,35 @@
|
|||||||
|
2002-03-06 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab,
|
||||||
|
gdk_pointer_ungrab): Bypass calls to the grab/ungrab functions in
|
||||||
|
gdkinput-win32.c, as they don't effectively do anything anyway.
|
||||||
|
(build_key_event_state): Set MOD2 bit if key is in AltGr group.
|
||||||
|
(gdk_event_translate): Call _gdk_windowing_window_get_offsets()
|
||||||
|
each time the offsets are used, on the window they refer to,
|
||||||
|
instead of once in the beginning. The window in question might
|
||||||
|
change due to event propagation.
|
||||||
|
(gdk_event_translate): Set key event group to 0 for non-AltGr
|
||||||
|
keys. Do set the SHIFT bit in the key event state also for
|
||||||
|
ISO_Left_Tab. Now backtabbing finally works again.
|
||||||
|
|
||||||
|
* gdk/win32/gdkunput-win32.c: Minor debugging output change.
|
||||||
|
|
||||||
|
* gdk/win32/gdkkeys-win32.c (update_keymap): Set VK_TAB mapping to
|
||||||
|
Gdk_Tab and GDK_ISO_Left_Tab, like on X11.
|
||||||
|
(gdk_keymap_translate_keyboard_state): Add similar code as in the
|
||||||
|
non-XKB case on X11 to generate a more correct
|
||||||
|
consumed_modifiers. Add debugging output.
|
||||||
|
(gdk_keyval_name): Use the U+xxxx format for UCS characters
|
||||||
|
encoded as keyvals. Never return NULL, but hex number
|
||||||
|
representation if keyval not in table.
|
||||||
|
|
||||||
|
* gdk/win32/gdkwindow-win32.c (gdk_window_focus): Call
|
||||||
|
SetFocus(). Doesn't seem to have any harmful effect, and probably
|
||||||
|
is close to what this function is supposed to do. But it didn't
|
||||||
|
fix GtkCombo as I had hoped.
|
||||||
|
(gdk_window_set_type_hint): Don't intern the _NET_WM_* atoms that
|
||||||
|
weren't used and wouldn't have any meaning on Win32 anyway.
|
||||||
|
|
||||||
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
Tue Mar 5 19:19:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
* gtk/gtkwindow.c (gtk_window_set_focus): When setting
|
||||||
@ -107,7 +139,7 @@ Mon Mar 4 12:43:48 2002 Owen Taylor <otaylor@redhat.com>
|
|||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
When calling XKeycodeToKeysym, use group * keysyms_per_keycode / 2
|
||||||
not group * keysyms_per_keycode. (Tor Lillquist)
|
not group * keysyms_per_keycode. (Tor Lillqvist)
|
||||||
|
|
||||||
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
|
||||||
Remove the hack to fudge the return value for GDK_Tab + Shift
|
Remove the hack to fudge the return value for GDK_Tab + Shift
|
||||||
|
@ -505,7 +505,7 @@ gdk_pointer_grab (GdkWindow *window,
|
|||||||
HWND hwnd_confined_to;
|
HWND hwnd_confined_to;
|
||||||
HCURSOR hcursor;
|
HCURSOR hcursor;
|
||||||
GdkCursorPrivate *cursor_private;
|
GdkCursorPrivate *cursor_private;
|
||||||
gint return_val;
|
gint return_val = GDK_GRAB_SUCCESS;
|
||||||
|
|
||||||
g_return_val_if_fail (window != NULL, 0);
|
g_return_val_if_fail (window != NULL, 0);
|
||||||
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
|
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
|
||||||
@ -522,13 +522,13 @@ gdk_pointer_grab (GdkWindow *window,
|
|||||||
hcursor = NULL;
|
hcursor = NULL;
|
||||||
else
|
else
|
||||||
hcursor = cursor_private->hcursor;
|
hcursor = cursor_private->hcursor;
|
||||||
|
#if 0
|
||||||
return_val = _gdk_input_grab_pointer (window,
|
return_val = _gdk_input_grab_pointer (window,
|
||||||
owner_events,
|
owner_events,
|
||||||
event_mask,
|
event_mask,
|
||||||
confine_to,
|
confine_to,
|
||||||
time);
|
time);
|
||||||
|
#endif
|
||||||
if (return_val == GDK_GRAB_SUCCESS)
|
if (return_val == GDK_GRAB_SUCCESS)
|
||||||
{
|
{
|
||||||
if (!GDK_WINDOW_DESTROYED (window))
|
if (!GDK_WINDOW_DESTROYED (window))
|
||||||
@ -579,8 +579,9 @@ void
|
|||||||
gdk_pointer_ungrab (guint32 time)
|
gdk_pointer_ungrab (guint32 time)
|
||||||
{
|
{
|
||||||
GDK_NOTE (EVENTS, g_print ("gdk_pointer_ungrab\n"));
|
GDK_NOTE (EVENTS, g_print ("gdk_pointer_ungrab\n"));
|
||||||
|
#if 0
|
||||||
_gdk_input_ungrab_pointer (time);
|
_gdk_input_ungrab_pointer (time);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if USE_SETCAPTURE
|
#if USE_SETCAPTURE
|
||||||
if (GetCapture () != NULL)
|
if (GetCapture () != NULL)
|
||||||
@ -638,8 +639,8 @@ find_window_for_pointer_event (GdkWindow* reported_window,
|
|||||||
if (other_window == NULL)
|
if (other_window == NULL)
|
||||||
return reported_window;
|
return reported_window;
|
||||||
|
|
||||||
GDK_NOTE (EVENTS, g_print ("Found window %#x for point (%ld, %ld)\n",
|
GDK_NOTE (EVENTS, g_print ("Found window %p for point (%ld, %ld)\n",
|
||||||
(guint) hwnd, pt.x, pt.y));
|
hwnd, pt.x, pt.y));
|
||||||
|
|
||||||
gdk_window_unref (reported_window);
|
gdk_window_unref (reported_window);
|
||||||
gdk_window_ref (other_window);
|
gdk_window_ref (other_window);
|
||||||
@ -665,6 +666,8 @@ find_window_for_pointer_event (GdkWindow* reported_window,
|
|||||||
gboolean
|
gboolean
|
||||||
gdk_pointer_is_grabbed (void)
|
gdk_pointer_is_grabbed (void)
|
||||||
{
|
{
|
||||||
|
GDK_NOTE (EVENTS, g_print ("gdk_pointer_is_grabbed: %s\n",
|
||||||
|
p_grab_window != NULL ? "TRUE" : "FALSE"));
|
||||||
return p_grab_window != NULL;
|
return p_grab_window != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -850,8 +853,11 @@ build_key_event_state (GdkEvent *event)
|
|||||||
event->key.state |= GDK_MOD1_MASK;
|
event->key.state |= GDK_MOD1_MASK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
event->key.state |= GDK_MOD2_MASK;
|
||||||
event->key.group = 1;
|
event->key.group = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
build_pointer_event_state (MSG *msg)
|
build_pointer_event_state (MSG *msg)
|
||||||
@ -1032,9 +1038,15 @@ print_event_state (gint state)
|
|||||||
CASE (LOCK);
|
CASE (LOCK);
|
||||||
CASE (CONTROL);
|
CASE (CONTROL);
|
||||||
CASE (MOD1);
|
CASE (MOD1);
|
||||||
|
CASE (MOD2);
|
||||||
|
CASE (MOD3);
|
||||||
|
CASE (MOD4);
|
||||||
|
CASE (MOD5);
|
||||||
CASE (BUTTON1);
|
CASE (BUTTON1);
|
||||||
CASE (BUTTON2);
|
CASE (BUTTON2);
|
||||||
CASE (BUTTON3);
|
CASE (BUTTON3);
|
||||||
|
CASE (BUTTON4);
|
||||||
|
CASE (BUTTON5);
|
||||||
#undef CASE
|
#undef CASE
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1649,7 +1661,7 @@ decode_key_lparam (LPARAM lParam)
|
|||||||
p += sprintf (p, "KF_ALTDOWN ");
|
p += sprintf (p, "KF_ALTDOWN ");
|
||||||
if (HIWORD (lParam) & KF_EXTENDED)
|
if (HIWORD (lParam) & KF_EXTENDED)
|
||||||
p += sprintf (p, "KF_EXTENDED ");
|
p += sprintf (p, "KF_EXTENDED ");
|
||||||
p += sprintf (p, "sc%d rep%d", LOBYTE (HIWORD (lParam)), LOWORD (lParam));
|
p += sprintf (p, "sc:%d rep:%d", LOBYTE (HIWORD (lParam)), LOWORD (lParam));
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
@ -1974,9 +1986,6 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* to translate coordinates to the internal > 16 bit system */
|
|
||||||
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
|
|
||||||
|
|
||||||
if (msg->message == msh_mousewheel_msg)
|
if (msg->message == msh_mousewheel_msg)
|
||||||
{
|
{
|
||||||
GDK_NOTE (EVENTS, g_print ("MSH_MOUSEWHEEL: %p %d\n",
|
GDK_NOTE (EVENTS, g_print ("MSH_MOUSEWHEEL: %p %d\n",
|
||||||
@ -2024,6 +2033,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
GDK_SCROLL_UP : GDK_SCROLL_DOWN;
|
GDK_SCROLL_UP : GDK_SCROLL_DOWN;
|
||||||
event->scroll.window = window;
|
event->scroll.window = window;
|
||||||
event->scroll.time = msg->time;
|
event->scroll.time = msg->time;
|
||||||
|
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
|
||||||
event->scroll.x = (gint16) pt.x + xoffset;
|
event->scroll.x = (gint16) pt.x + xoffset;
|
||||||
event->scroll.y = (gint16) pt.y + yoffset;
|
event->scroll.y = (gint16) pt.y + yoffset;
|
||||||
event->scroll.x_root = (gint16) LOWORD (msg->lParam);
|
event->scroll.x_root = (gint16) LOWORD (msg->lParam);
|
||||||
@ -2101,7 +2111,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
case WM_SYSKEYUP:
|
case WM_SYSKEYUP:
|
||||||
case WM_SYSKEYDOWN:
|
case WM_SYSKEYDOWN:
|
||||||
GDK_NOTE (EVENTS,
|
GDK_NOTE (EVENTS,
|
||||||
g_print ("WM_SYSKEY%s: %p %s vk%.02x %s\n",
|
g_print ("WM_SYSKEY%s: %p %s vk:%.02x %s\n",
|
||||||
(msg->message == WM_SYSKEYUP ? "UP" : "DOWN"),
|
(msg->message == WM_SYSKEYUP ? "UP" : "DOWN"),
|
||||||
msg->hwnd,
|
msg->hwnd,
|
||||||
(GetKeyNameText (msg->lParam, buf,
|
(GetKeyNameText (msg->lParam, buf,
|
||||||
@ -2118,10 +2128,6 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
|| msg->wParam == VK_RETURN
|
|| msg->wParam == VK_RETURN
|
||||||
|| msg->wParam == VK_F4)
|
|| msg->wParam == VK_F4)
|
||||||
break;
|
break;
|
||||||
/* Ignore auto-repeated Shift or Alt keypresses (good idea???) */
|
|
||||||
if ((msg->wParam == VK_SHIFT || msg->wParam == VK_MENU) &&
|
|
||||||
(HIWORD (msg->lParam) & KF_REPEAT))
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* Jump to code in common with WM_KEYUP and WM_KEYDOWN */
|
/* Jump to code in common with WM_KEYUP and WM_KEYDOWN */
|
||||||
goto keyup_or_down;
|
goto keyup_or_down;
|
||||||
@ -2129,7 +2135,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
case WM_KEYUP:
|
case WM_KEYUP:
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
GDK_NOTE (EVENTS,
|
GDK_NOTE (EVENTS,
|
||||||
g_print ("WM_KEY%s: %p %s vk%.02x %s\n",
|
g_print ("WM_KEY%s: %p %s vk:%.02x %s\n",
|
||||||
(msg->message == WM_KEYUP ? "UP" : "DOWN"),
|
(msg->message == WM_KEYUP ? "UP" : "DOWN"),
|
||||||
msg->hwnd,
|
msg->hwnd,
|
||||||
(GetKeyNameText (msg->lParam, buf,
|
(GetKeyNameText (msg->lParam, buf,
|
||||||
@ -2396,7 +2402,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
GDK_KEY_PRESS : GDK_KEY_RELEASE);
|
GDK_KEY_PRESS : GDK_KEY_RELEASE);
|
||||||
event->key.time = msg->time;
|
event->key.time = msg->time;
|
||||||
event->key.state = 0;
|
event->key.state = 0;
|
||||||
if (event->key.keyval != GDK_ISO_Left_Tab && GetKeyState (VK_SHIFT) < 0)
|
if (GetKeyState (VK_SHIFT) < 0)
|
||||||
event->key.state |= GDK_SHIFT_MASK;
|
event->key.state |= GDK_SHIFT_MASK;
|
||||||
if (GetKeyState (VK_CAPITAL) & 0x1)
|
if (GetKeyState (VK_CAPITAL) & 0x1)
|
||||||
event->key.state |= GDK_LOCK_MASK;
|
event->key.state |= GDK_LOCK_MASK;
|
||||||
@ -2405,7 +2411,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
if (msg->wParam != VK_MENU && GetKeyState (VK_MENU) < 0)
|
if (msg->wParam != VK_MENU && GetKeyState (VK_MENU) < 0)
|
||||||
event->key.state |= GDK_MOD1_MASK;
|
event->key.state |= GDK_MOD1_MASK;
|
||||||
event->key.hardware_keycode = msg->wParam;
|
event->key.hardware_keycode = msg->wParam;
|
||||||
event->key.group = (event->key.state & GDK_MOD1_MASK) != 0;
|
event->key.group = 0;
|
||||||
event->key.string = NULL;
|
event->key.string = NULL;
|
||||||
event->key.length = 0;
|
event->key.length = 0;
|
||||||
return_val = !GDK_WINDOW_DESTROYED (window);
|
return_val = !GDK_WINDOW_DESTROYED (window);
|
||||||
@ -2544,10 +2550,11 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
translate_mouse_coords (orig_window, window, msg);
|
translate_mouse_coords (orig_window, window, msg);
|
||||||
event->button.x = current_x = (gint16) LOWORD (msg->lParam);
|
event->button.x = current_x = (gint16) LOWORD (msg->lParam);
|
||||||
event->button.y = current_y = (gint16) HIWORD (msg->lParam);
|
event->button.y = current_y = (gint16) HIWORD (msg->lParam);
|
||||||
|
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
|
||||||
event->button.x += xoffset; /* XXX translate current_x, y too? */
|
event->button.x += xoffset; /* XXX translate current_x, y too? */
|
||||||
event->button.y += yoffset;
|
event->button.y += yoffset;
|
||||||
event->button.x_root = msg->pt.x;
|
event->button.x_root = current_x_root = msg->pt.x;
|
||||||
event->button.y_root = msg->pt.y;
|
event->button.y_root = current_y_root = msg->pt.y;
|
||||||
event->button.axes = NULL;
|
event->button.axes = NULL;
|
||||||
event->button.state = build_pointer_event_state (msg);
|
event->button.state = build_pointer_event_state (msg);
|
||||||
event->button.button = button;
|
event->button.button = button;
|
||||||
@ -2600,10 +2607,11 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
event->button.time = msg->time;
|
event->button.time = msg->time;
|
||||||
if (window != orig_window)
|
if (window != orig_window)
|
||||||
translate_mouse_coords (orig_window, window, msg);
|
translate_mouse_coords (orig_window, window, msg);
|
||||||
|
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
|
||||||
event->button.x = (gint16) LOWORD (msg->lParam) + xoffset;
|
event->button.x = (gint16) LOWORD (msg->lParam) + xoffset;
|
||||||
event->button.y = (gint16) HIWORD (msg->lParam) + yoffset;
|
event->button.y = (gint16) HIWORD (msg->lParam) + yoffset;
|
||||||
event->button.x_root = msg->pt.x;
|
event->button.x_root = current_x_root = msg->pt.x;
|
||||||
event->button.y_root = msg->pt.y;
|
event->button.y_root = current_y_root = msg->pt.y;
|
||||||
event->button.axes = NULL;
|
event->button.axes = NULL;
|
||||||
event->button.state = build_pointer_event_state (msg);
|
event->button.state = build_pointer_event_state (msg);
|
||||||
event->button.button = button;
|
event->button.button = button;
|
||||||
@ -2664,6 +2672,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
translate_mouse_coords (orig_window, window, msg);
|
translate_mouse_coords (orig_window, window, msg);
|
||||||
event->motion.x = current_x = (gint16) LOWORD (msg->lParam);
|
event->motion.x = current_x = (gint16) LOWORD (msg->lParam);
|
||||||
event->motion.y = current_y = (gint16) HIWORD (msg->lParam);
|
event->motion.y = current_y = (gint16) HIWORD (msg->lParam);
|
||||||
|
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
|
||||||
event->motion.x += xoffset;
|
event->motion.x += xoffset;
|
||||||
event->motion.y += yoffset;
|
event->motion.y += yoffset;
|
||||||
event->motion.x_root = current_x_root = msg->pt.x;
|
event->motion.x_root = current_x_root = msg->pt.x;
|
||||||
@ -2691,7 +2700,8 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
event->crossing.window = current_window;
|
event->crossing.window = current_window;
|
||||||
event->crossing.subwindow = NULL;
|
event->crossing.subwindow = NULL;
|
||||||
event->crossing.time = msg->time;
|
event->crossing.time = msg->time;
|
||||||
event->crossing.x = current_x + xoffset; /* XXX translated current_x */
|
_gdk_windowing_window_get_offsets (current_window, &xoffset, &yoffset);
|
||||||
|
event->crossing.x = current_x + xoffset;
|
||||||
event->crossing.y = current_y + yoffset;
|
event->crossing.y = current_y + yoffset;
|
||||||
event->crossing.x_root = current_x_root;
|
event->crossing.x_root = current_x_root;
|
||||||
event->crossing.y_root = current_y_root;
|
event->crossing.y_root = current_y_root;
|
||||||
@ -2758,6 +2768,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
GDK_SCROLL_UP : GDK_SCROLL_DOWN;
|
GDK_SCROLL_UP : GDK_SCROLL_DOWN;
|
||||||
event->scroll.window = window;
|
event->scroll.window = window;
|
||||||
event->scroll.time = msg->time;
|
event->scroll.time = msg->time;
|
||||||
|
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
|
||||||
event->scroll.x = (gint16) pt.x + xoffset;
|
event->scroll.x = (gint16) pt.x + xoffset;
|
||||||
event->scroll.y = (gint16) pt.y + yoffset;
|
event->scroll.y = (gint16) pt.y + yoffset;
|
||||||
event->scroll.x_root = (gint16) LOWORD (msg->lParam);
|
event->scroll.x_root = (gint16) LOWORD (msg->lParam);
|
||||||
@ -2779,10 +2790,11 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
event->crossing.window = window;
|
event->crossing.window = window;
|
||||||
event->crossing.subwindow = NULL;
|
event->crossing.subwindow = NULL;
|
||||||
event->crossing.time = msg->time;
|
event->crossing.time = msg->time;
|
||||||
event->crossing.x = current_x + xoffset; /* XXX translated current_x */
|
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
|
||||||
|
event->crossing.x = current_x + xoffset;
|
||||||
event->crossing.y = current_y + yoffset;
|
event->crossing.y = current_y + yoffset;
|
||||||
event->crossing.x_root = current_xroot;
|
event->crossing.x_root = current_x_root;
|
||||||
event->crossing.y_root = current_yroot;
|
event->crossing.y_root = current_y_root;
|
||||||
event->crossing.mode = GDK_CROSSING_NORMAL;
|
event->crossing.mode = GDK_CROSSING_NORMAL;
|
||||||
if (current_window
|
if (current_window
|
||||||
&& IsChild (GDK_WINDOW_HWND (current_window), GDK_WINDOW_HWND (window)))
|
&& IsChild (GDK_WINDOW_HWND (current_window), GDK_WINDOW_HWND (window)))
|
||||||
@ -2951,6 +2963,7 @@ gdk_event_translate (GdkEvent *event,
|
|||||||
{
|
{
|
||||||
GdkRectangle expose_rect;
|
GdkRectangle expose_rect;
|
||||||
|
|
||||||
|
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
|
||||||
expose_rect.x = paintstruct.rcPaint.left + xoffset;
|
expose_rect.x = paintstruct.rcPaint.left + xoffset;
|
||||||
expose_rect.y = paintstruct.rcPaint.top + yoffset;
|
expose_rect.y = paintstruct.rcPaint.top + yoffset;
|
||||||
expose_rect.width = paintstruct.rcPaint.right - paintstruct.rcPaint.left;
|
expose_rect.width = paintstruct.rcPaint.right - paintstruct.rcPaint.left;
|
||||||
|
@ -1000,10 +1000,10 @@ _gdk_input_grab_pointer (GdkWindow *window,
|
|||||||
new_window = NULL;
|
new_window = NULL;
|
||||||
need_ungrab = FALSE;
|
need_ungrab = FALSE;
|
||||||
|
|
||||||
GDK_NOTE (INPUT, g_print ("gdk_input_win32_grab_pointer: %#x %d %#x\n",
|
GDK_NOTE (INPUT, g_print ("gdk_input_win32_grab_pointer: %p %d %p\n",
|
||||||
(guint) GDK_WINDOW_HWND (window),
|
GDK_WINDOW_HWND (window),
|
||||||
owner_events,
|
owner_events,
|
||||||
(confine_to ? (guint) GDK_WINDOW_HWND (confine_to) : 0)));
|
(confine_to ? GDK_WINDOW_HWND (confine_to) : 0)));
|
||||||
|
|
||||||
while (tmp_list)
|
while (tmp_list)
|
||||||
{
|
{
|
||||||
|
@ -113,7 +113,11 @@ update_keymap (void)
|
|||||||
case VK_BACK:
|
case VK_BACK:
|
||||||
*ksymp = GDK_BackSpace; break;
|
*ksymp = GDK_BackSpace; break;
|
||||||
case VK_TAB:
|
case VK_TAB:
|
||||||
*ksymp = GDK_Tab; break;
|
if (i & 1)
|
||||||
|
*ksymp = GDK_ISO_Left_Tab;
|
||||||
|
else
|
||||||
|
*ksymp = GDK_Tab;
|
||||||
|
break;
|
||||||
case VK_CLEAR:
|
case VK_CLEAR:
|
||||||
*ksymp = GDK_Clear; break;
|
*ksymp = GDK_Clear; break;
|
||||||
case VK_RETURN:
|
case VK_RETURN:
|
||||||
@ -261,15 +265,17 @@ update_keymap (void)
|
|||||||
#ifdef G_ENABLE_DEBUG
|
#ifdef G_ENABLE_DEBUG
|
||||||
if (_gdk_debug_flags & GDK_DEBUG_EVENTS)
|
if (_gdk_debug_flags & GDK_DEBUG_EVENTS)
|
||||||
{
|
{
|
||||||
gint i, j;
|
gint vk;
|
||||||
|
|
||||||
g_print ("keymap:\n");
|
g_print ("keymap:\n");
|
||||||
for (i = 0; i < 256; i++)
|
for (vk = 0; vk < 256; vk++)
|
||||||
{
|
{
|
||||||
g_print ("%#.02x: ", i);
|
gint state;
|
||||||
for (j = 0; j < 4; j++)
|
|
||||||
|
g_print ("%#.02x: ", vk);
|
||||||
|
for (state = 0; state < 4; state++)
|
||||||
{
|
{
|
||||||
gchar *name = gdk_keyval_name (keysym_tab[i*4 + j]);
|
gchar *name = gdk_keyval_name (keysym_tab[vk*4 + state]);
|
||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
name = "(none)";
|
name = "(none)";
|
||||||
g_print ("%s ", name);
|
g_print ("%s ", name);
|
||||||
@ -597,11 +603,18 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
|||||||
GdkModifierType *consumed_modifiers)
|
GdkModifierType *consumed_modifiers)
|
||||||
{
|
{
|
||||||
guint tmp_keyval;
|
guint tmp_keyval;
|
||||||
|
guint tmp_modifiers;
|
||||||
|
guint *keyvals;
|
||||||
gint shift_level;
|
gint shift_level;
|
||||||
|
gboolean ignore_shift = FALSE;
|
||||||
|
gboolean ignore_group = FALSE;
|
||||||
|
|
||||||
g_return_val_if_fail (keymap == NULL || GDK_IS_KEYMAP (keymap), FALSE);
|
g_return_val_if_fail (keymap == NULL || GDK_IS_KEYMAP (keymap), FALSE);
|
||||||
g_return_val_if_fail (group < 4, FALSE);
|
g_return_val_if_fail (group < 4, FALSE);
|
||||||
|
|
||||||
|
GDK_NOTE (EVENTS, g_print ("gdk_keymap_translate_keyboard_state: keycode=%#x state=%#x group=%d\n",
|
||||||
|
hardware_keycode, state, group));
|
||||||
|
|
||||||
if (keyval)
|
if (keyval)
|
||||||
*keyval = 0;
|
*keyval = 0;
|
||||||
if (effective_group)
|
if (effective_group)
|
||||||
@ -630,7 +643,51 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
|||||||
|
|
||||||
update_keymap ();
|
update_keymap ();
|
||||||
|
|
||||||
tmp_keyval = keysym_tab[hardware_keycode*4 + group*2 + shift_level];
|
keyvals = keysym_tab + hardware_keycode*4;
|
||||||
|
|
||||||
|
/* Drop group and shift if there are no keysymbols on
|
||||||
|
* the key for those.
|
||||||
|
*/
|
||||||
|
if (shift_level == 1 &&
|
||||||
|
keyvals[group*2 + 1] == GDK_VoidSymbol &&
|
||||||
|
keyvals[group*2] != GDK_VoidSymbol)
|
||||||
|
{
|
||||||
|
shift_level = 0;
|
||||||
|
ignore_shift = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (group == 1 &&
|
||||||
|
keyvals[2 + shift_level] == GDK_VoidSymbol &&
|
||||||
|
keyvals[0 + shift_level] != GDK_VoidSymbol)
|
||||||
|
{
|
||||||
|
group = 0;
|
||||||
|
ignore_group = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyvals[group *2 + shift_level] == GDK_VoidSymbol &&
|
||||||
|
keyvals[0 + 0] != GDK_VoidSymbol)
|
||||||
|
{
|
||||||
|
shift_level = 0;
|
||||||
|
group = 0;
|
||||||
|
ignore_group = TRUE;
|
||||||
|
ignore_shift = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* See whether the group and shift level actually mattered
|
||||||
|
* to know what to put in consumed_modifiers
|
||||||
|
*/
|
||||||
|
if (keyvals[group*2 + 1] == GDK_VoidSymbol ||
|
||||||
|
keyvals[group*2 + 0] == keyvals[group*2 + 1])
|
||||||
|
ignore_shift = TRUE;
|
||||||
|
|
||||||
|
if (keyvals[2 + shift_level] == GDK_VoidSymbol ||
|
||||||
|
keyvals[0 + shift_level] == keyvals[2 + shift_level])
|
||||||
|
ignore_group = TRUE;
|
||||||
|
|
||||||
|
tmp_keyval = keyvals[group*2 + shift_level];
|
||||||
|
|
||||||
|
tmp_modifiers = ignore_group ? 0 : GDK_MOD2_MASK;
|
||||||
|
tmp_modifiers |= ignore_shift ? 0 : (GDK_SHIFT_MASK | GDK_LOCK_MASK);
|
||||||
|
|
||||||
if (effective_group)
|
if (effective_group)
|
||||||
*effective_group = group;
|
*effective_group = group;
|
||||||
@ -638,22 +695,15 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
|||||||
if (level)
|
if (level)
|
||||||
*level = shift_level;
|
*level = shift_level;
|
||||||
|
|
||||||
/* GDK_ISO_Left_Tab, as usually configured through XKB, really messes
|
|
||||||
* up the whole idea of "consumed modifiers" because shift is consumed.
|
|
||||||
* However, <shift>Tab is not _consistently_ GDK_ISO_Left_Tab, so people
|
|
||||||
* can't bind to GDK_ISO_Left_Tab instead. So, we force consistency here.
|
|
||||||
*/
|
|
||||||
if (tmp_keyval == GDK_Tab && shift_level == 1)
|
|
||||||
{
|
|
||||||
tmp_keyval = GDK_ISO_Left_Tab;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (consumed_modifiers)
|
if (consumed_modifiers)
|
||||||
*consumed_modifiers = GDK_SHIFT_MASK | GDK_LOCK_MASK;
|
*consumed_modifiers = tmp_modifiers;
|
||||||
|
|
||||||
if (keyval)
|
if (keyval)
|
||||||
*keyval = tmp_keyval;
|
*keyval = tmp_keyval;
|
||||||
|
|
||||||
|
GDK_NOTE (EVENTS, g_print ("...group=%d level=%d cmods=%#x keyval=%s\n",
|
||||||
|
group, shift_level, tmp_modifiers, gdk_keyval_name (tmp_keyval)));
|
||||||
|
|
||||||
return tmp_keyval != GDK_VoidSymbol;
|
return tmp_keyval != GDK_VoidSymbol;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1981,8 +2031,16 @@ gdk_keys_keyval_compare (const void *pkey, const void *pbase)
|
|||||||
gchar*
|
gchar*
|
||||||
gdk_keyval_name (guint keyval)
|
gdk_keyval_name (guint keyval)
|
||||||
{
|
{
|
||||||
|
static gchar buf[100];
|
||||||
struct gdk_key *found;
|
struct gdk_key *found;
|
||||||
|
|
||||||
|
/* Check for directly encoded 24-bit UCS characters: */
|
||||||
|
if ((keyval & 0xff000000) == 0x01000000)
|
||||||
|
{
|
||||||
|
sprintf (buf, "U+%.04X", (keyval & 0x00ffffff));
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
found = bsearch (&keyval, gdk_keys_by_keyval,
|
found = bsearch (&keyval, gdk_keys_by_keyval,
|
||||||
GDK_NUM_KEYS, sizeof (struct gdk_key),
|
GDK_NUM_KEYS, sizeof (struct gdk_key),
|
||||||
gdk_keys_keyval_compare);
|
gdk_keys_keyval_compare);
|
||||||
@ -1996,7 +2054,10 @@ gdk_keyval_name (guint keyval)
|
|||||||
return (gchar *) found->name;
|
return (gchar *) found->name;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return NULL;
|
{
|
||||||
|
sprintf (buf, "%#x", keyval);
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -2302,8 +2302,7 @@ gdk_window_set_static_win_gravity (GdkWindow *window, gboolean on)
|
|||||||
{
|
{
|
||||||
g_return_if_fail (window != NULL);
|
g_return_if_fail (window != NULL);
|
||||||
|
|
||||||
GDK_NOTE (MISC,
|
GDK_NOTE (MISC, g_print ("gdk_window_set_static_win_gravity: Not implemented\n"));
|
||||||
g_print ("gdk_window_set_static_win_gravity: Not implemented\n"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
@ -2485,7 +2484,10 @@ gdk_window_focus (GdkWindow *window,
|
|||||||
if (GDK_WINDOW_DESTROYED (window))
|
if (GDK_WINDOW_DESTROYED (window))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
GDK_NOTE (MISC, g_print ("gdk_window_focus: %p\n", GDK_WINDOW_HWND (window)));
|
||||||
|
|
||||||
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
|
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
|
||||||
|
SetFocus (GDK_WINDOW_HWND (window));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -2514,8 +2516,6 @@ void
|
|||||||
gdk_window_set_type_hint (GdkWindow *window,
|
gdk_window_set_type_hint (GdkWindow *window,
|
||||||
GdkWindowTypeHint hint)
|
GdkWindowTypeHint hint)
|
||||||
{
|
{
|
||||||
GdkAtom atom;
|
|
||||||
|
|
||||||
g_return_if_fail (window != NULL);
|
g_return_if_fail (window != NULL);
|
||||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||||
|
|
||||||
@ -2525,26 +2525,21 @@ gdk_window_set_type_hint (GdkWindow *window,
|
|||||||
switch (hint)
|
switch (hint)
|
||||||
{
|
{
|
||||||
case GDK_WINDOW_TYPE_HINT_DIALOG:
|
case GDK_WINDOW_TYPE_HINT_DIALOG:
|
||||||
atom = gdk_atom_intern ("_NET_WM_WINDOW_TYPE_DIALOG", FALSE);
|
|
||||||
break;
|
break;
|
||||||
case GDK_WINDOW_TYPE_HINT_MENU:
|
case GDK_WINDOW_TYPE_HINT_MENU:
|
||||||
atom = gdk_atom_intern ("_NET_WM_WINDOW_TYPE_MENU", FALSE);
|
|
||||||
break;
|
break;
|
||||||
case GDK_WINDOW_TYPE_HINT_TOOLBAR:
|
case GDK_WINDOW_TYPE_HINT_TOOLBAR:
|
||||||
atom = gdk_atom_intern ("_NET_WM_WINDOW_TYPE_TOOLBAR", FALSE);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("Unknown hint %d passed to gdk_window_set_type_hint", hint);
|
g_warning ("Unknown hint %d passed to gdk_window_set_type_hint", hint);
|
||||||
/* Fall thru */
|
/* Fall thru */
|
||||||
case GDK_WINDOW_TYPE_HINT_NORMAL:
|
case GDK_WINDOW_TYPE_HINT_NORMAL:
|
||||||
atom = gdk_atom_intern ("_NET_WM_WINDOW_TYPE_NORMAL", FALSE);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* XXX ???
|
* XXX ???
|
||||||
*/
|
*/
|
||||||
GDK_NOTE (MISC,
|
GDK_NOTE (MISC, g_print ("gdk_window_set_type_hint (%p)\n",
|
||||||
g_print ("gdk_window_set_type_hint (%p)\n",
|
|
||||||
GDK_WINDOW_HWND (window)));
|
GDK_WINDOW_HWND (window)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user