From Martin Aumueller, "
a collegue of mine noticed that on Windows and X11 the modifier state (such as Alt or Ctrl) would be applied one key press too late: e.g. press & hold Alt, press a, release Alt, press a, press a would generate the key sequence a, Alt-a, a instead of Alt-a, a, a. The problem is also present on Carbon. Moving the call to setModKeyMask in front of the call to keyPress fixed it for me on Carbon and X11. I suppose that this will fix the problem for Windows as well."
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#include <X11/cursorfont.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#include <X11/Xmd.h> /* For CARD16 */
|
||||
#include <X11/Xmd.h> /* For CARD16 */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -932,8 +932,8 @@ void GraphicsWindowX11::checkEvents()
|
||||
unsigned int modifierMask = 0;
|
||||
adaptKey(ev.xkey, keySymbol, modifierMask);
|
||||
|
||||
getEventQueue()->keyPress(keySymbol, eventTime);
|
||||
getEventQueue()->getCurrentEventState()->setModKeyMask(modifierMask);
|
||||
getEventQueue()->keyPress(keySymbol, eventTime);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -947,8 +947,8 @@ void GraphicsWindowX11::checkEvents()
|
||||
unsigned int modifierMask = 0;
|
||||
adaptKey(ev.xkey, keySymbol, modifierMask);
|
||||
|
||||
getEventQueue()->keyRelease(keySymbol, eventTime);
|
||||
getEventQueue()->getCurrentEventState()->setModKeyMask(modifierMask);
|
||||
getEventQueue()->keyRelease(keySymbol, eventTime);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user