[gtk+/quartz-integration: 851/851] Merge branch 'master' into quartz-integration
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/quartz-integration: 851/851] Merge branch 'master' into quartz-integration
- Date: Fri, 24 Dec 2010 21:26:56 +0000 (UTC)
commit 607f2fbedf954b294f45e03a82259326e3149e72
Merge: 2006176 806b6df
Author: John Ralls <jralls ceridwen us>
Date: Fri Dec 24 13:26:11 2010 -0800
Merge branch 'master' into quartz-integration
Makefile.am | 1 +
autogen.sh | 134 +-
docs/reference/gtk/gtk3-sections.txt | 6 +-
docs/reference/gtk/migrating-2to3.xml | 47 +
gdk/Makefile.am | 25 +-
gdk/gdkdevice.c | 5 +-
gdk/gdkdisplaymanager.c | 13 +
gdk/gdkdnd.c | 1 +
gdk/gdkevents.c | 2 -
gdk/gdkkeynames.c | 8 +-
gdk/gdkkeys.c | 42 +-
gdk/gdkoffscreenwindow.c | 9 +-
.../{GdkQuartzWindow.c => GdkQuartzNSWindow.c} | 11 +-
.../{GdkQuartzWindow.h => GdkQuartzNSWindow.h} | 4 +-
gdk/quartz/GdkQuartzView.c | 2 +-
gdk/quartz/Makefile.am | 32 +-
gdk/quartz/gdkcursor-quartz.c | 209 +-
gdk/quartz/gdkdevice-core-quartz.c | 371 +
gdk/quartz/gdkdevice-core.c | 354 -
gdk/quartz/gdkdevice-core.h | 51 -
...nager-core.c => gdkdevicemanager-core-quartz.c} | 72 +-
...kim-quartz.c => gdkdevicemanager-core-quartz.h} | 43 +-
gdk/quartz/gdkdevicemanager-core.h | 54 -
gdk/quartz/gdkdisplay-quartz.c | 284 +-
gdk/quartz/gdkdisplaymanager-quartz.c | 177 +
gdk/quartz/gdkdnd-quartz.c | 210 +-
gdk/quartz/{GdkQuartzWindow.h => gdkdnd-quartz.h} | 45 +-
gdk/quartz/gdkeventloop-quartz.c | 2 +-
gdk/quartz/gdkevents-quartz.c | 130 +-
gdk/quartz/gdkgeometry-quartz.c | 73 -
gdk/quartz/gdkinput-old.c | 68 -
gdk/quartz/gdkinput.c | 285 -
gdk/quartz/gdkinputprivate.h | 149 -
gdk/quartz/gdkkeys-quartz.c | 154 +-
gdk/quartz/gdkmain-quartz.c | 81 -
gdk/quartz/gdkprivate-quartz.h | 275 +-
gdk/quartz/gdkproperty-quartz.c | 59 +-
gdk/quartz/gdkquartz.h | 24 +-
gdk/quartz/gdkquartzcursor.h | 51 +
gdk/quartz/gdkquartzdevice-core.h | 45 +
gdk/quartz/gdkquartzdevicemanager-core.h | 47 +
gdk/quartz/gdkquartzdisplay.h | 52 +
gdk/quartz/gdkquartzdisplaymanager.h | 48 +
gdk/quartz/gdkquartzdnd.h | 53 +
gdk/quartz/gdkquartzkeys.h | 51 +
gdk/quartz/gdkquartzscreen.h | 51 +
gdk/quartz/{GdkQuartzWindow.h => gdkquartzutils.h} | 40 +-
gdk/quartz/gdkquartzvisual.h | 52 +
gdk/quartz/gdkquartzwindow.h | 54 +
gdk/quartz/gdkscreen-quartz.c | 269 +-
gdk/quartz/gdkscreen-quartz.h | 27 +-
gdk/quartz/gdkselection-quartz.c | 111 +-
gdk/quartz/gdkspawn-quartz.c | 106 -
gdk/quartz/gdktestutils-quartz.c | 84 +-
gdk/quartz/gdkutils-quartz.c | 99 +
gdk/quartz/gdkvisual-quartz.c | 131 +-
gdk/quartz/gdkwindow-quartz.c | 502 +-
gdk/quartz/gdkwindow-quartz.h | 2 +-
gdk/x11/gdkdisplay-x11.c | 11 -
gtk/Makefile.am | 137 +-
gtk/gtk.symbols | 9 +-
gtk/gtkaccellabel.c | 16 +-
gtk/gtkarrow.c | 49 +-
gtk/gtkcellrendererprogress.c | 2 +-
gtk/gtkcellrenderertext.c | 10 +-
gtk/gtkclipboard-quartz.c | 3 +-
gtk/gtkcombobox.c | 58 +-
gtk/gtkcssprovider.c | 5 +-
gtk/gtkdnd-quartz.c | 21 +-
gtk/gtkdnd.c | 82 +-
gtk/gtkdrawingarea.h | 3 +
gtk/gtkgrid.c | 4 +-
gtk/gtkiconfactory.c | 2 +-
gtk/gtklabel.c | 1 +
gtk/gtkmain.c | 4 +-
gtk/gtkmenu.c | 3143 +++----
gtk/gtkmenu.h | 58 +-
gtk/gtkmenubar.c | 49 +-
gtk/gtkmenuitem.c | 43 +-
gtk/gtkmenuprivate.h | 89 +
gtk/gtkmenushell.c | 1074 ++--
gtk/gtkmenushell.h | 129 +-
gtk/gtkmenushellprivate.h | 82 +
gtk/gtknotebook.c | 10 +-
gtk/gtkpaned.c | 49 +-
gtk/gtkquartz.c | 1 +
gtk/gtkrc.c | 3 +-
gtk/gtkseparator.c | 59 +-
gtk/gtksettings.c | 1137 ++--
gtk/gtksettings.h | 100 +-
gtk/gtksettingsprivate.h | 43 +
gtk/gtkspinbutton.c | 15 +-
gtk/gtkstyle.c | 2 -
gtk/gtkstylecontext.c | 8 +-
gtk/gtktearoffmenuitem.c | 8 +-
gtk/gtkthemes.c | 194 -
gtk/gtkthemes.h | 52 -
gtk/gtktreeview.c | 5 +
gtk/gtktreeviewcolumn.c | 7 +-
gtk/gtkuimanager.c | 11 +-
gtk/gtkwidget.c | 19 +-
gtk/gtkwidget.h | 3 +
gtk/gtkwindow.c | 445 +-
gtk/gtkwindow.h | 30 +-
modules/other/gail/gail.c | 26 +-
modules/other/gail/gailmenushell.c | 52 +-
modules/other/gail/gailsubmenuitem.c | 48 +-
po-properties/es.po | 551 +-
po/ku.po | 2276 +++---
po/ug.po |10008 ++++++++++----------
tests/prop-editor.c | 37 +-
tests/testverticalcells.c | 1 +
112 files changed, 12634 insertions(+), 13037 deletions(-)
---
diff --cc gdk/quartz/gdkkeys-quartz.c
index 7dba9f3,768d10d..d91dc65
--- a/gdk/quartz/gdkkeys-quartz.c
+++ b/gdk/quartz/gdkkeys-quartz.c
@@@ -182,279 -205,246 +205,268 @@@ const static struct
{ 0x001d, GDK_KEY_Right },
{ 0x001e, GDK_KEY_Up },
{ 0x001f, GDK_KEY_Down },
- { 0x007f, GDK_KEY_Delete }
+ { 0x007f, GDK_KEY_Delete },
+ { 0xf060, GDK_KEY_dead_grave },
+ { 0xf300, GDK_KEY_dead_grave },
+ { 0xf0b4, GDK_KEY_dead_acute },
+ { 0xf301, GDK_KEY_dead_acute },
+ { 0xf385, GDK_KEY_dead_acute },
+ { 0xf05e, GDK_KEY_dead_circumflex },
+ { 0xf2c6, GDK_KEY_dead_circumflex },
+ { 0xf302, GDK_KEY_dead_circumflex },
+ { 0xf07e, GDK_KEY_dead_tilde },
+ { 0xf303, GDK_KEY_dead_tilde },
+ { 0xf342, GDK_KEY_dead_perispomeni },
+ { 0xf0af, GDK_KEY_dead_macron },
+ { 0xf304, GDK_KEY_dead_macron },
+ { 0xf2d8, GDK_KEY_dead_breve },
+ { 0xf306, GDK_KEY_dead_breve },
+ { 0xf2d9, GDK_KEY_dead_abovedot },
+ { 0xf307, GDK_KEY_dead_abovedot },
+ { 0xf0a8, GDK_KEY_dead_diaeresis },
+ { 0xf308, GDK_KEY_dead_diaeresis },
+ { 0xf2da, GDK_KEY_dead_abovering },
+ { 0xf30A, GDK_KEY_dead_abovering },
+ { 0xf2dd, GDK_KEY_dead_doubleacute },
+ { 0xf30B, GDK_KEY_dead_doubleacute },
+ { 0xf2c7, GDK_KEY_dead_caron },
+ { 0xf30C, GDK_KEY_dead_caron },
+ { 0xf0be, GDK_KEY_dead_cedilla },
+ { 0xf327, GDK_KEY_dead_cedilla },
+ { 0xf2db, GDK_KEY_dead_ogonek },
+ { 0xf328, GDK_KEY_dead_ogonek },
+ { 0xfe5d, GDK_KEY_dead_iota },
+ { 0xf323, GDK_KEY_dead_belowdot },
+ { 0xf309, GDK_KEY_dead_hook },
+ { 0xf31B, GDK_KEY_dead_horn },
+ { 0xf02d, GDK_KEY_dead_stroke },
+ { 0xf335, GDK_KEY_dead_stroke },
+ { 0xf336, GDK_KEY_dead_stroke },
+ { 0xf313, GDK_KEY_dead_abovecomma },
+ /* { 0xf313, GDK_KEY_dead_psili }, */
+ { 0xf314, GDK_KEY_dead_abovereversedcomma },
+ /* { 0xf314, GDK_KEY_dead_dasia }, */
+ { 0xf30F, GDK_KEY_dead_doublegrave },
+ { 0xf325, GDK_KEY_dead_belowring },
+ { 0xf2cd, GDK_KEY_dead_belowmacron },
+ { 0xf331, GDK_KEY_dead_belowmacron },
+ { 0xf32D, GDK_KEY_dead_belowcircumflex },
+ { 0xf330, GDK_KEY_dead_belowtilde },
+ { 0xf32E, GDK_KEY_dead_belowbreve },
+ { 0xf324, GDK_KEY_dead_belowdiaeresis },
+ { 0xf311, GDK_KEY_dead_invertedbreve },
+ { 0xf02c, GDK_KEY_dead_belowcomma },
+ { 0xf326, GDK_KEY_dead_belowcomma }
};
-
-static void
-maybe_update_keymap (void)
+typedef struct _KBLayout KBLayout;
+static UniChar get_keyvalue_uchr(KBLayout *layout, int key, UInt32 modifiers);
+static UniChar get_keyvalue_kchr(KBLayout *layout, int key, UInt32 modifiers);
+struct _KBLayout
{
- const void *chr_data = NULL;
+ gpointer ref;
+ UniChar (*get_keyvalue)(KBLayout*, int, UInt32);
+ gpointer data;
+};
#ifdef __LP64__
- TISInputSourceRef new_layout = TISCopyCurrentKeyboardLayoutInputSource ();
+
+static KBLayout
+get_keyboard_layout (void)
+{
+ KBLayout layout;
CFDataRef layout_data_ref;
+ layout.get_keyvalue = &get_keyvalue_uchr;
+ layout.ref = (gpointer)TISCopyCurrentKeyboardLayoutInputSource ();
+
+ layout_data_ref = (CFDataRef) TISGetInputSourceProperty
+ ((TISInputSourceRef)layout.ref, kTISPropertyUnicodeKeyLayoutData);
+
+ if (layout_data_ref)
+ layout.data = CFDataGetBytePtr (layout_data_ref);
+
+ if (layout.data == NULL)
+ {
+ g_error ("cannot get keyboard layout data");
+ }
+ return layout;
+}
+
#else
- KeyboardLayoutRef new_layout;
- KeyboardLayoutKind layout_kind;
- KLGetCurrentKeyboardLayout (&new_layout);
+static KBLayout
+get_keyboard_layout (void)
+{
+ KBLayout layout;
+ UInt32 data_type;
+ SInt32 layout_kind;
+
+ KLGetCurrentKeyboardLayout ((KeyboardLayoutRef*)&layout.ref);
+ /* Get the layout kind */
+ KLGetKeyboardLayoutProperty (layout.ref, kKLKind, (const void **)&layout_kind);
+ if (layout_kind == kKLKCHRKind)
+ {
+ data_type = kKLKCHRData;
+ layout.get_keyvalue = &get_keyvalue_kchr;
+ }
+ else
+ {
+ data_type = kKLuchrData;
+ layout.get_keyvalue = &get_keyvalue_uchr;
+ }
+ /* Get chr data */
+ KLGetKeyboardLayoutProperty (layout.ref, data_type, (const void **)&layout.data);
+ return layout;
+}
#endif
- if (new_layout != current_layout)
+static UniChar
+get_keyvalue_kchr(KBLayout *layout, int key, UInt32 modifiers)
+{
+#ifndef __LP64__
+ UInt32 state = 0;
+ UInt32 c;
+ UInt16 key_code = modifiers | key;
+ c = KeyTranslate (layout->data, key_code, &state);
+
+ if (state != 0)
{
- guint *p;
- int i;
+ UInt32 state2 = 0;
+ c = KeyTranslate (layout->data, key_code | 128, &state2);
+ }
- g_free (keyval_array);
- keyval_array = g_new0 (guint, NUM_KEYCODES * KEYVALS_PER_KEYCODE);
+ if (c == 0 && c == 0x10)
+ {
+ return (UniChar)0;
+ }
+ return macroman2ucs (c);
+#endif
+}
-#ifdef __LP64__
- layout_data_ref = (CFDataRef) TISGetInputSourceProperty
- (new_layout, kTISPropertyUnicodeKeyLayoutData);
+static UniChar
+get_keyvalue_uchr(KBLayout *layout, int key, UInt32 modifiers)
+{
+ UInt32 state = 0;
+ OSStatus err;
+ UniChar chars[4];
+ UniCharCount nChars;
+
+ err = UCKeyTranslate (layout->data, key,
+ kUCKeyActionDisplay,
+ (modifiers >> 8) & 0xFF,
+ LMGetKbdType(),
+ 0,
+ &state, 4, &nChars, chars);
+
+ if (err != noErr)
+ return 0;
+ /* A few <Shift><Option>keys return two characters, the first of
+ * which is U+00a0, which isn't interesting; so we return the
+ * second. More sophisticated handling is the job of a GtkIMContext.
+ */
+ /* If state isn't zero, it means that it's a dead key of some
+ sort. Some of those are enumerated in the special_ucs_table with
+ the high nibble set to f to push it into the private use
+ range. Here we do the same.
+ */
+ if (state != 0)
+ chars[nChars - 1] |= 0xf000;
+ return chars[nChars -1];
+}
- if (layout_data_ref)
- chr_data = CFDataGetBytePtr (layout_data_ref);
+static void
+maybe_update_keymap (void)
+{
+ KBLayout new_layout = get_keyboard_layout();
- if (chr_data == NULL)
- {
- g_error ("cannot get keyboard layout data");
- return;
- }
-#else
- /* Get the layout kind */
- KLGetKeyboardLayoutProperty (new_layout, kKLKind, (const void **)&layout_kind);
-
- /* 8-bit-only keyabord layout */
- if (layout_kind == kKLKCHRKind)
- {
- /* Get chr data */
- KLGetKeyboardLayoutProperty (new_layout, kKLKCHRData, (const void **)&chr_data);
-
- for (i = 0; i < NUM_KEYCODES; i++)
- {
- int j;
- UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
+ if (new_layout.ref == current_layout || new_layout.data == NULL)
+ return;
- p = keyval_array + i * KEYVALS_PER_KEYCODE;
-
- for (j = 0; j < KEYVALS_PER_KEYCODE; j++)
- {
- UInt32 c, state = 0;
- UInt16 key_code;
- UniChar uc;
-
- key_code = modifiers[j] | i;
- c = KeyTranslate (chr_data, key_code, &state);
-
- if (state != 0)
- {
- UInt32 state2 = 0;
- c = KeyTranslate (chr_data, key_code | 128, &state2);
- }
-
- if (c != 0 && c != 0x10)
- {
- int k;
- gboolean found = FALSE;
-
- /* FIXME: some keyboard layouts (e.g. Russian) use
- * a different 8-bit character set. We should
- * check for this. Not a serious problem, because
- * most (all?) of these layouts also have a
- * uchr version.
- */
- uc = macroman2ucs (c);
-
- for (k = 0; k < G_N_ELEMENTS (special_ucs_table); k++)
- {
- if (special_ucs_table[k].ucs_value == uc)
- {
- p[j] = special_ucs_table[k].keyval;
- found = TRUE;
- break;
- }
- }
-
- /* Special-case shift-tab since GTK+ expects
- * GDK_KEY_ISO_Left_Tab for that.
- */
- if (found && p[j] == GDK_KEY_Tab && modifiers[j] == shiftKey)
- p[j] = GDK_KEY_ISO_Left_Tab;
-
- if (!found)
- {
- guint tmp;
-
- tmp = gdk_unicode_to_keyval (uc);
- if (tmp != (uc | 0x01000000))
- p[j] = tmp;
- else
- p[j] = 0;
- }
- }
- }
+ guint *p;
+ int i;
+
+ g_free (keyval_array);
+ keyval_array = g_new0 (guint, NUM_KEYCODES * KEYVALS_PER_KEYCODE);
+
+ for (i = 0; i < NUM_KEYCODES; i++)
+ {
+ int j;
+ UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
+
+ p = keyval_array + i * KEYVALS_PER_KEYCODE;
- if (p[3] == p[2])
- p[3] = 0;
- if (p[2] == p[1])
- p[2] = 0;
- if (p[1] == p[0])
- p[1] = 0;
- if (p[0] == p[2] &&
- p[1] == p[3])
- p[2] = p[3] = 0;
- }
- }
- /* unicode keyboard layout */
- else if (layout_kind == kKLKCHRuchrKind || layout_kind == kKLuchrKind)
- {
- /* Get chr data */
- KLGetKeyboardLayoutProperty (new_layout, kKLuchrData, (const void **)&chr_data);
-#endif
-
- for (i = 0; i < NUM_KEYCODES; i++)
- {
- int j;
- UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
- UniChar chars[4];
- UniCharCount nChars;
+ for (j = 0; j < KEYVALS_PER_KEYCODE; j++)
+ {
+ UniChar uc;
+ gboolean found = FALSE;
+ int k;
+
+ uc = new_layout.get_keyvalue(&new_layout, i, modifiers[j]);
- p = keyval_array + i * KEYVALS_PER_KEYCODE;
- for (j = 0; j < KEYVALS_PER_KEYCODE; j++)
+ for (k = 0; k < G_N_ELEMENTS (special_ucs_table); k++)
+ {
+ if (special_ucs_table[k].ucs_value == uc)
{
- UInt32 state = 0;
- OSStatus err;
- UInt16 key_code;
- UniChar uc;
-
- key_code = modifiers[j] | i;
- err = UCKeyTranslate (chr_data, i, kUCKeyActionDown,
- (modifiers[j] >> 8) & 0xFF,
- LMGetKbdType(),
- kUCKeyTranslateNoDeadKeysMask,
- &state, 4, &nChars, chars);
-
-
- /* FIXME: Theoretically, we can get multiple UTF-16 values;
- * we should convert them to proper unicode and figure
- * out whether there are really keyboard layouts that
- * give us more than one character for one keypress. */
- if (err == noErr && nChars == 1)
- {
- int k;
- gboolean found = FALSE;
-
- uc = chars[0];
-
- for (k = 0; k < G_N_ELEMENTS (special_ucs_table); k++)
- {
- if (special_ucs_table[k].ucs_value == uc)
- {
- p[j] = special_ucs_table[k].keyval;
- found = TRUE;
- break;
- }
- }
-
- /* Special-case shift-tab since GTK+ expects
- * GDK_KEY_ISO_Left_Tab for that.
- */
- if (found && p[j] == GDK_KEY_Tab && modifiers[j] == shiftKey)
- p[j] = GDK_KEY_ISO_Left_Tab;
+ p[j] = special_ucs_table[k].keyval;
+ found = TRUE;
+ break;
+ }
+ }
- if (!found)
- {
- guint tmp;
+ /* Special-case shift-tab since GTK+ expects
+ * GDK_KEY_ISO_Left_Tab for that.
+ */
+ if (found && p[j] == GDK_KEY_Tab && modifiers[j] == shiftKey)
+ p[j] = GDK_KEY_ISO_Left_Tab;
+
+ if (!found)
+ {
+ guint tmp;
- tmp = gdk_unicode_to_keyval (uc);
- if (tmp != (uc | 0x01000000))
- p[j] = tmp;
- else
- p[j] = 0;
- }
- }
- }
-
- if (p[3] == p[2])
- p[3] = 0;
- if (p[2] == p[1])
- p[2] = 0;
- if (p[1] == p[0])
- p[1] = 0;
- if (p[0] == p[2] &&
- p[1] == p[3])
- p[2] = p[3] = 0;
+ tmp = gdk_unicode_to_keyval (uc);
+ if (tmp != (uc | 0x01000000))
+ p[j] = tmp;
+ else
+ p[j] = 0;
}
-#ifndef __LP64__
- }
- else
- {
- g_error ("unknown type of keyboard layout (neither KCHR nor uchr)"
- " - not supported right now");
}
-#endif
- for (i = 0; i < G_N_ELEMENTS (known_keys); i++)
- {
- p = keyval_array + known_keys[i].keycode * KEYVALS_PER_KEYCODE;
+ if (p[3] == p[2])
+ p[3] = 0;
+ if (p[2] == p[1])
+ p[2] = 0;
+ if (p[1] == p[0])
+ p[1] = 0;
+ if (p[0] == p[2] &&
+ p[1] == p[3])
+ p[2] = p[3] = 0;
+ }
+ for (i = 0; i < G_N_ELEMENTS (known_keys); i++)
+ {
+ p = keyval_array + known_keys[i].keycode * KEYVALS_PER_KEYCODE;
- if (p[0] == 0 && p[1] == 0 &&
- p[2] == 0 && p[3] == 0)
- p[0] = known_keys[i].keyval;
- }
+ if (p[0] == 0 && p[1] == 0 &&
+ p[2] == 0 && p[3] == 0)
+ p[0] = known_keys[i].keyval;
+ }
- for (i = 0; i < G_N_ELEMENTS (known_numeric_keys); i++)
- {
- p = keyval_array + known_numeric_keys[i].keycode * KEYVALS_PER_KEYCODE;
+ for (i = 0; i < G_N_ELEMENTS (known_numeric_keys); i++)
+ {
+ p = keyval_array + known_numeric_keys[i].keycode * KEYVALS_PER_KEYCODE;
- if (p[0] == known_numeric_keys[i].normal_keyval)
- p[0] = known_numeric_keys[i].keypad_keyval;
- }
+ if (p[0] == known_numeric_keys[i].normal_keyval)
+ p[0] = known_numeric_keys[i].keypad_keyval;
+ }
- if (current_layout)
- g_signal_emit_by_name (default_keymap, "keys_changed");
+ if (current_layout)
+ g_signal_emit_by_name (default_keymap, "keys_changed");
- current_layout = new_layout;
- }
+ current_layout = new_layout.ref;
}
- GdkKeymap *
- gdk_keymap_get_for_display (GdkDisplay *display)
- {
- g_return_val_if_fail (display == gdk_display_get_default (), NULL);
-
- if (default_keymap == NULL)
- default_keymap = g_object_new (gdk_keymap_get_type (), NULL);
-
- return default_keymap;
- }
-
- PangoDirection
- gdk_keymap_get_direction (GdkKeymap *keymap)
+ static PangoDirection
+ gdk_quartz_keymap_get_direction (GdkKeymap *keymap)
{
return PANGO_DIRECTION_NEUTRAL;
}
@@@ -681,26 -656,18 +678,26 @@@ gdk_quartz_keymap_translate_keyboard_st
return TRUE;
}
- void
- gdk_keymap_add_virtual_modifiers (GdkKeymap *keymap,
- GdkModifierType *state)
+ static void
+ gdk_quartz_keymap_add_virtual_modifiers (GdkKeymap *keymap,
+ GdkModifierType *state)
{
- /* FIXME: For now, we've mimiced the Windows backend. */
+ if (*state & GDK_MOD1_MASK)
+ *state |= GDK_META_MASK;
+ if (*state & GDK_MOD5_MASK)
+ *state |= GDK_SUPER_MASK;
+
}
- gboolean
- gdk_keymap_map_virtual_modifiers (GdkKeymap *keymap,
- GdkModifierType *state)
+ static gboolean
+ gdk_quartz_keymap_map_virtual_modifiers (GdkKeymap *keymap,
+ GdkModifierType *state)
{
- /* FIXME: For now, we've mimiced the Windows backend. */
+ if (*state & GDK_META_MASK)
+ *state |= GDK_MOD1_MASK;
+ if (*state & GDK_SUPER_MASK)
+ *state |= GDK_MOD5_MASK;
+
return TRUE;
}
diff --cc gtk/Makefile.am
index a068bf3,a9cf1a5..8b55108
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@@ -717,30 -716,33 +715,34 @@@ gtk_private_h_sources += gtkprint-win32
gtk_c_sources += $(gtk_os_win32_c_sources)
endif
- gtk_use_x11_c_sources = \
- gtkplug-x11.c \
- gtksocket-x11.c \
- gtkxembed.c \
- gtktrayicon-x11.c \
+ gtk_use_x11_c_sources = \
+ gtkplug-x11.c \
+ gtksocket-x11.c \
+ gtkxembed.c \
+ gtktrayicon-x11.c \
gtkmountoperation-x11.c
- gtk_use_win32_c_sources = \
- gtkplug-win32.c \
- gtksocket-win32.c \
- gtkwin32embed.c \
- gtkwin32embedwidget.c \
+ gtk_use_win32_c_sources = \
+ gtkplug-win32.c \
+ gtksocket-win32.c \
+ gtkwin32embed.c \
+ gtkwin32embedwidget.c \
gtkmountoperation-stub.c
- gtk_use_quartz_c_sources = \
+ gtk_use_quartz_c_sources = \
gtksearchenginequartz.c \
++ gtkquartz.c \
gtkplug-stub.c \
gtksocket-stub.c \
gtkmountoperation-stub.c
- gtk_use_stub_c_sources = \
- gtkplug-stub.c \
- gtksocket-stub.c \
+ gtk_use_stub_c_sources = \
+ gtkplug-stub.c \
+ gtksocket-stub.c \
gtkmountoperation-stub.c
--gtk_all_c_sources += $(gtk_use_x11_c_sources) $(gtk_use_win32_c_sources) $(gtk_use_quartz_c_sources) $(gtk_use_stub_c_sources)
++gtk_all_c_sources += $(gtk_use_x11_c_sources) $(gtk_use_win32_c_sources) $(gtk_use_stub_c_sources)
if USE_X11
- gtk_private_h_sources += gtkxembed.h gtktrayicon.h xembed.h
+ gtk_private_h_sources += \
+ gtkxembed.h \
+ gtktrayicon.h \
+ xembed.h
gtk_c_sources += $(gtk_use_x11_c_sources)
else
if USE_WIN32
@@@ -748,9 -752,10 +752,10 @@@ gtk_private_h_sources +=
gtk_c_sources += $(gtk_use_win32_c_sources)
else
if USE_QUARTZ
- gtk_private_h_sources += gtksearchenginequartz.h
+ gtk_private_h_sources += \
+ gtksearchenginequartz.h
gtk_c_sources += $(gtk_use_quartz_c_sources)
- libgtk_quartz_3_0_la_CFLAGS = "-xobjective-c"
-gtk_use_quartz_c_sources_CFLAGS = "-xobjective-c"
++libgtk_3_0_la_CFLAGS = "-xobjective-c"
else
gtk_c_sources += $(gtk_use_stub_c_sources)
endif
@@@ -758,10 -763,17 +763,12 @@@ endi
endif
if USE_QUARTZ
- gtk_clipboard_dnd_c_sources = gtkclipboard-quartz.c gtkdnd-quartz.c gtkquartz.c
+ gtk_clipboard_dnd_c_sources = \
+ gtkclipboard-quartz.c \
- gtkdnd-quartz.c \
- gtkquartz.c
++ gtkdnd-quartz.c
gtk_clipboard_dnd_h_sources = gtkquartz.h
-gtk_clipboard_dnd_c_sources_CFLAGS = "-xobjective-c"
else
-gtk_clipboard_dnd_c_sources = \
- gtkclipboard.c \
- gtkdnd.c
-gtk_clipboard_dnd_c_sources_CFLAGS =
+gtk_clipboard_dnd_c_sources = gtkclipboard.c gtkdnd.c
endif
EXTRA_DIST += gtkquartz.h
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]