It turns out that my attempt at handling Super, Hyper and Meta better
is causing problems, mostly because Alt and Meta are commonly colocated
in the modmap, and apps do a check for the Alt modifier regularly.
See e.g bug 607697.
This patch changes GDK to add all matching virtual modifiers in
the state field of the key event. The corresponding GTK+ change makes
use of a new GdkKeymap function to map virtual modifiers back to
real modifiers and detect conflicts while doing so.
This should fix bug 603190 and bug 427409.
2008-09-29 Matthias Clasen <mclasen@redhat.com>
Bug 107000 – Add signals to GdkKeymap for monitoring caps_lock, etc.
* gdk/gdk.symbols:
* gdk/gdkkeys.[ch]: Add a new GdkKeymap::state-changed signal, and
a gdk_keymap_get_caps_lock_state function.
* gdk/x11/gdkkeys-x11.c: Implement it here. For now, only emit
state-changed when caps lock lockedness changes.
* gdk/x11/gdkdisplay-x11.c: Also select for modifier lock status
changes in the XkbSelectEventDetails call.
svn path=/trunk/; revision=21545
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2008-05-28 Michael Natterer <mitch@imendio.com>
* gdk/gdk.h: define __GDK_H_INSIDE__ around including all other
headers.
* gdk/gdkenumtypes.h.template
* gdk/gdk*.h: add single-include guards that #error out if
GTK_DISABLE_SINGLE_INCLUDES is defined and any of these files is
included individually. Also removed some redundant includes and
did some tiny trailing whitespace removal that's not worth to
commit separately.
* gdk/gdkprivate.h: include <gdk/gdk.h> instead of individual
files.
* gdk/win32/gdkwin32.h
* gdk/x11/gdkx.h: only include <gdk/gdkprivate.h> and remove all
other includes.
svn path=/trunk/; revision=20217
2007-06-29 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
* gdk/gdkkeys.h:
* gdk/x11/gdkkeys-x11.c (gdk_keymap_have_bidi_layouts): New
function to determine if keyboard layouts for both LTR and LTR
languages are in use. Refactor the direction caching code to
make this information available. (#451575, Behnam Esfahbod)
svn path=/trunk/; revision=18301
Mon Sep 23 16:48:46 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkkeys.[ch] gdk/x11/gdkkeys-x11.c gdk/x11/gdkevents-x11.c:
Add a keys_changed signal emitted when the keymap changes.
(#72148)
* gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry):
Hook up code to handle keymap changes, change to keep
a linked list of keymap entries so that we can reinsert
them in the same order on a keymap change.
Thu Apr 25 16:51:40 2002 Owen Taylor <otaylor@redhat.com>
Start of integration of Erwann Chenede's multihead work
from the gtk-multihead branch.
* gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch]
gdk/x11/gdkdisplay-x11.[ch] gdk/x11/gdkscreen-x11.[ch]
New classes representing a set of screens with attached
input devices and a single contiguous area, respectively.
* gdk/gdk.[ch] gdk/gdkinternals.h gdk/x11/gdkmain-x11.c:
gdk/x11/gdkprivate-x11.h: Make the initialization interface
simple _gdk_windowing_init() and do the rest in
gdk_open_display() calls.
* gdk/gdk.[ch]: Add gdk_parse_args() which can be used
to do the display-independent part of initialization
instead of gdk_init_[check].
* gdk/gdkcursor.h gdk/gdkfont.h gdk/gdkkeys.h gdk/gdkpixmap.h
gdk/gdkproperty.h gdk/gdkselection.h gdk/gdkwindow.h:
Add multihead variants (_for_display(), for_screen()) of functions
getting information specific to a particular screen screen or
display.
* gdk/gdkscreen.[ch]: Add gdk_screen__* variants of functions
like gdk_rgb_get_colormap() that used to get/list global
objects.
* gdk/x11/gdkx.h: Add functions for converting GdkScreen
and GdkDisplay into the X equivalents.
* gdk/x11/gdkwindow-x11.c: Removed gdk_window_xid_at_coords()
not in the headers and unused.
* configure.in gdk/x11/{gxid.c,gxid_lib.[ch],gdkinput-gxi.c}:
Remove gxid support ... has not been tested for a long time...
"xfree" support is more portable to non XFree86.
* gdk/**.h: Add a GDK_MULTIHEAD_SAFE define that can be
used to turn off functions that are inherently non-multihead
safe.
* gdk/**.c: add GDK_NOTE(multihead, ...) calls when functions
are used in non-multihead-safe ways.
* gdk/*.c gdk/x11/*.c: Changes to make the internals of GDK
multihead safe.
Wed Feb 20 14:26:47 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkkeyhash.[ch]: Implement "fuzzy" key binding lookups;
allow matches on key and level but not group. Also, implement
ignoring "consumed modifiers correctly."
* gtk/gtkaccelgroup.c gtk/gtkbindings.c: Convert to using
GtkKeyHash.
* gtk/gtkdebug.h gtk/gtkmain.c: Support GTK_DEBUG=keybindings
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Fill in
the group for key release events as well as key press events.
* gdk/gdkkeys.h gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
Rename unused_modifiers to consumed_modifiers, make the docs and
non-Xkb implementation match the Xkb implementation.
* gdk/linux-fb/gdkkeyboard-fb.c gdk/win32/gdkkeys-win32.c: Propagate
doc and parameter name changes.
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
XkbTranslateKeyCode doesn't handle LockMask, we need to handle
it ourselves.
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Force
<Shift>Tab to give GDK_ISO_Left_Tab, since we need consistency
to allow dealing with ISO_Left_Tab.
* gtk/gtkwindow.c gtk/gtktextview.c gtk/gtkscrolledwindow.c
gtk/gtkpaned.c gtk/gtkcombo.c gtk/gtknotebook.c:
Remove inappropriate uses of GDK_ISO_Left_Tab. (GDK_ISO_Left_Tab
or <Shift>Tab both are equivalent as a binding specifier.)
* gtk/gtkbutton.c (gtk_button_class_init): Make ::activate
GTK_RUN_ACTION, so you can bind an accelerator to it.
* gtk/gtklabel.c (gtk_label_set_uline_text_internal): Call
gdk_unicode_to_keyval on the mnemonic character.
* tests/testgtk.c: Add a test for the new fuzzy key binding matching.
Tue Dec 18 16:07:28 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkkeys.h (struct _GdkKeymapClass): Fix
prototype for direction_changed. (Reported by
Jeff Franks.)
Fri Jun 8 12:03:07 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkkeys.[ch]: Add a direction-changed signal,
and gdk_keymap_get_current_direction().
* gdk/x11/gdkevents-x11.c gdk/x11/gdkkeys-x11.c
gdk/x11/gdkmain-x11.c gdk/x11/gdkprivate-x11.h: Track
the current locked group, use it to set the keymap
direction.
* gtk/gtksettings.c: Add a new gtk-split-cursor setting
to determine whether we draw a split cursor or use
a jumping cursor based on the current direction.
* gtk/gtkentry.c gtk/gtktextview.c gtk/gtktextlayout.[ch]:
Obey the split cursor setting.
Fri Jun 8 11:57:50 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimmulticontext.c (activate_cb): Only activate
when toggling on, not when toggling off... (#55906)
Wed Jun 6 10:37:07 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_double_buffered):
s/gdk_window_begin_paint/gdk_window_begin_paint_region/
in docs. (#55812, Vitaly Tishkov)
2000-12-03 Havoc Pennington <hp@pobox.com>
* gdk/Makefile.am: add gdkkeys.[hc]
* gdk/gdkkeys.h, gdk/gdkkeys.c: Move all the keyval stuff to these
files from gdk.h, gdk.c; add GdkKeymap type and operations on it.
* acconfig.h, configure.in: add checks and command line options
for XKB
* gdk/x11/gdkkeys-x11.c: Implement the above functions
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Put the keycode
and group in the key event
* gdk/gdkevents.h (struct _GdkEventKey): Add a hardware_keycode
field with the low-level hardware key code, and a group
field with the keyboard group
* gdk/x11/gdkprivate-x11.h: include config.h for HAVE_XKB,
and declare a couple globals used for keymap handling
* gtk/gtkimcontextsimple.c: Implement ISO 14755 input method,
hold down Shift-Control and type a hex number to get a Unicode
character corresponding to the hex number
(gtk_im_context_simple_get_preedit_string): Fix cursor position
(return bytes not chars)