summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_x/xlib
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2012-06-27 10:47:57 +0000
committerSebastian Dransfeld <sd@tango.flipp.net>2012-06-27 10:47:57 +0000
commit84e54d532df6bf03034a801109dff61f7c9e708a (patch)
treeb35468cfabc481a5ba2819e3dda6a7e74fc76619 /legacy/ecore/src/lib/ecore_x/xlib
parent18c327cfffb806b70bb595d06c88700d508228f8 (diff)
ecore: Fix support for intl keyboards
Map XK_Mode_switch to new modifier and use it to match AltGr key. In ecore_imf xim module this key should be reported as Mod5Mask, and windows key as Mod4Mask. Does none of the e developers use international keyboards? SVN revision: 72937
Diffstat (limited to 'legacy/ecore/src/lib/ecore_x/xlib')
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c12
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c3
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x_private.h1
3 files changed, 12 insertions, 4 deletions
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c
index 98c2526..e40966f 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c
@@ -130,6 +130,7 @@ int ECORE_X_MODIFIER_SHIFT = 0;
130int ECORE_X_MODIFIER_CTRL = 0; 130int ECORE_X_MODIFIER_CTRL = 0;
131int ECORE_X_MODIFIER_ALT = 0; 131int ECORE_X_MODIFIER_ALT = 0;
132int ECORE_X_MODIFIER_WIN = 0; 132int ECORE_X_MODIFIER_WIN = 0;
133int ECORE_X_MODIFIER_MODE = 0;
133 134
134EAPI int ECORE_X_LOCK_SCROLL = 0; 135EAPI int ECORE_X_LOCK_SCROLL = 0;
135EAPI int ECORE_X_LOCK_NUM = 0; 136EAPI int ECORE_X_LOCK_NUM = 0;
@@ -217,8 +218,9 @@ _ecore_x_XKeycodeToKeysym(Display *display, KeyCode keycode, int idx)
217{ 218{
218#ifdef ECORE_XKB 219#ifdef ECORE_XKB
219 return XkbKeycodeToKeysym(display, keycode, 0, idx); 220 return XkbKeycodeToKeysym(display, keycode, 0, idx);
220#endif 221#else
221 return XKeycodeToKeysym(display, keycode, idx); 222 return XKeycodeToKeysym(display, keycode, idx);
223#endif
222} 224}
223 225
224void 226void
@@ -239,11 +241,10 @@ _ecore_x_modifiers_get(void)
239 /* the windows key... a valid modifier :) */ 241 /* the windows key... a valid modifier :) */
240 ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L); 242 ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L);
241 if (!ECORE_X_MODIFIER_WIN) 243 if (!ECORE_X_MODIFIER_WIN)
242 ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch);
243
244 if (!ECORE_X_MODIFIER_WIN)
245 ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L); 244 ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L);
246 245
246 ECORE_X_MODIFIER_MODE = _ecore_x_key_mask_get(XK_Mode_switch);
247
247 if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT) 248 if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT)
248 ECORE_X_MODIFIER_WIN = 0; 249 ECORE_X_MODIFIER_WIN = 0;
249 250
@@ -2155,6 +2156,9 @@ _ecore_x_event_modifier(unsigned int state)
2155 if (state & ECORE_EVENT_MODIFIER_WIN) 2156 if (state & ECORE_EVENT_MODIFIER_WIN)
2156 xmodifiers |= ECORE_X_MODIFIER_WIN; 2157 xmodifiers |= ECORE_X_MODIFIER_WIN;
2157 2158
2159 if (state & ECORE_EVENT_MODIFIER_MODE)
2160 xmodifiers |= ECORE_X_MODIFIER_MODE;
2161
2158 if (state & ECORE_EVENT_LOCK_SCROLL) 2162 if (state & ECORE_EVENT_LOCK_SCROLL)
2159 xmodifiers |= ECORE_X_LOCK_SCROLL; 2163 xmodifiers |= ECORE_X_LOCK_SCROLL;
2160 2164
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c
index acb64a9..6125a4e 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c
@@ -183,6 +183,9 @@ _ecore_x_event_modifiers(unsigned int state)
183 if (state & ECORE_X_MODIFIER_WIN) 183 if (state & ECORE_X_MODIFIER_WIN)
184 modifiers |= ECORE_EVENT_MODIFIER_WIN; 184 modifiers |= ECORE_EVENT_MODIFIER_WIN;
185 185
186 if (state & ECORE_X_MODIFIER_MODE)
187 modifiers |= ECORE_EVENT_MODIFIER_MODE;
188
186 if (state & ECORE_X_LOCK_SCROLL) 189 if (state & ECORE_X_LOCK_SCROLL)
187 modifiers |= ECORE_EVENT_LOCK_SCROLL; 190 modifiers |= ECORE_EVENT_LOCK_SCROLL;
188 191
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_private.h b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_private.h
index 8132e13..c389f53 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_private.h
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_private.h
@@ -186,6 +186,7 @@ extern int ECORE_X_MODIFIER_SHIFT;
186extern int ECORE_X_MODIFIER_CTRL; 186extern int ECORE_X_MODIFIER_CTRL;
187extern int ECORE_X_MODIFIER_ALT; 187extern int ECORE_X_MODIFIER_ALT;
188extern int ECORE_X_MODIFIER_WIN; 188extern int ECORE_X_MODIFIER_WIN;
189extern int ECORE_X_MODIFIER_MODE;
189 190
190extern int ECORE_X_LOCK_SCROLL; 191extern int ECORE_X_LOCK_SCROLL;
191extern int ECORE_X_LOCK_NUM; 192extern int ECORE_X_LOCK_NUM;