[Bf-blender-cvs] [6f4c7f1f017] master: GHOST/X11: Correct non-latin kb workaround case

Campbell Barton noreply at git.blender.org
Sat Jun 9 12:06:17 CEST 2018


Commit: 6f4c7f1f0173773fc75e2ad0c992f384d8a193b6
Author: Campbell Barton
Date:   Sat Jun 9 12:04:07 2018 +0200
Branches: master
https://developer.blender.org/rB6f4c7f1f0173773fc75e2ad0c992f384d8a193b6

GHOST/X11: Correct non-latin kb workaround case

Harmless since this is always enabled,
only do this for easier troubleshooting when disabling the define.

===================================================================

M	intern/ghost/intern/GHOST_SystemX11.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 6d28310baaf..b8069e81eab 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -871,7 +871,6 @@ GHOST_SystemX11::processEvent(XEvent *xe)
 		{
 			XKeyEvent *xke = &(xe->xkey);
 			KeySym key_sym;
-			KeySym key_sym_str;
 			char ascii;
 #if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
 			/* utf8_array[] is initial buffer used for Xutf8LookupString().
@@ -916,6 +915,7 @@ GHOST_SystemX11::processEvent(XEvent *xe)
 			 *
 			 * [1] http://cgit.freedesktop.org/xorg/lib/libX11/tree/src/KeyBind.c
 			 */
+			KeySym key_sym_str;
 			/* Mode_switch 'modifier' is AltGr - when this one or Shift are enabled, we do not want to apply
 			 * that 'forced number' hack. */
 			const unsigned int mode_switch_mask = XkbKeysymToModifiers(xke->display, XK_Mode_switch);
@@ -1000,7 +1000,7 @@ GHOST_SystemX11::processEvent(XEvent *xe)
 				key_sym = XLookupKeysym(xke, 0);
 			}
 
-			gkey = ghost_key_from_keysym(key_sym);
+			gkey = ghost_key_from_keysym_or_keycode(key_sym, m_xkb_descr, xke->keycode);
 
 			if (!XLookupString(xke, &ascii, 1, NULL, NULL)) {
 				ascii = '\0';



More information about the Bf-blender-cvs mailing list