OSDN Git Service

compared with definition in getX11AutoRepeat()
authorIvailo Monev <xakepa10@gmail.com>
Wed, 13 Jan 2021 06:39:02 +0000 (08:39 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Wed, 13 Jan 2021 06:39:16 +0000 (08:39 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/kernel/qkeymapper_x11.cpp

index fef062a..fa6df51 100644 (file)
@@ -180,7 +180,7 @@ static int translateKeySym(const uint key)
 static bool getX11AutoRepeat() {
     XKeyboardState state;
     XGetKeyboardControl(qt_x11Data->display, &state);
-    if (state.global_auto_repeat) {
+    if (state.global_auto_repeat == AutoRepeatModeOn) {
         // NOTE: according to `xset -q` the delay is 250,
         // QApplication::keyboardInputInterval() is set to 400 but it does not
         // have the same meaning nor is it clear if the events are delayed by