summaryrefslogtreecommitdiff
path: root/legacy/ecore
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-07-12 13:54:39 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-07-12 13:54:39 +0000
commit26b608ceb0bb8839e5ff52cdb1433cc3fd65d605 (patch)
tree1e5f8b02551d318f169beb1251a115a7f0738617 /legacy/ecore
parentbea2e5af1cdb17954c273111999c338272da32ac (diff)
well it seems x changed how it maps keysyms to keycodes to break our keysym
finder... but now i changed it to play a different game. :) SVN revision: 15747
Diffstat (limited to 'legacy/ecore')
-rw-r--r--legacy/ecore/src/lib/ecore_x/ecore_x.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/legacy/ecore/src/lib/ecore_x/ecore_x.c b/legacy/ecore/src/lib/ecore_x/ecore_x.c
index af15dcc114..f2097ab25f 100644
--- a/legacy/ecore/src/lib/ecore_x/ecore_x.c
+++ b/legacy/ecore/src/lib/ecore_x/ecore_x.c
@@ -332,7 +332,7 @@ ecore_x_init(const char *name)
332 /* the windows key... a valid modifier :) */ 332 /* the windows key... a valid modifier :) */
333 ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L); 333 ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L);
334 if (!ECORE_X_MODIFIER_WIN) 334 if (!ECORE_X_MODIFIER_WIN)
335 ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch); 335 ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch);
336 if (!ECORE_X_MODIFIER_WIN) 336 if (!ECORE_X_MODIFIER_WIN)
337 ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L); 337 ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L);
338 338
@@ -659,8 +659,8 @@ static int
659_ecore_x_key_mask_get(KeySym sym) 659_ecore_x_key_mask_get(KeySym sym)
660{ 660{
661 XModifierKeymap *mod; 661 XModifierKeymap *mod;
662 KeyCode nl; 662 KeySym sym2;
663 int i; 663 int i, j;
664 const int masks[8] = 664 const int masks[8] =
665 { 665 {
666 ShiftMask, LockMask, ControlMask, 666 ShiftMask, LockMask, ControlMask,
@@ -668,12 +668,16 @@ _ecore_x_key_mask_get(KeySym sym)
668 }; 668 };
669 669
670 mod = XGetModifierMapping(_ecore_x_disp); 670 mod = XGetModifierMapping(_ecore_x_disp);
671 nl = XKeysymToKeycode(_ecore_x_disp, sym);
672 if ((mod) && (mod->max_keypermod > 0)) 671 if ((mod) && (mod->max_keypermod > 0))
673 { 672 {
674 for (i = 0; i < (8 * mod->max_keypermod); i++) 673 for (i = 0; i < (8 * mod->max_keypermod); i++)
675 { 674 {
676 if ((nl) && (mod->modifiermap[i] == nl)) 675 for (j = 0; j < 8; j++)
676 {
677 sym2 = XKeycodeToKeysym(_ecore_x_disp, mod->modifiermap[i], j);
678 if (sym2 != 0) break;
679 }
680 if (sym2 == sym)
677 { 681 {
678 int mask; 682 int mask;
679 683