summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-04-25 11:52:06 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-04-25 11:52:06 +0200
commit6d21285e0f7462cc1d98c92242cd4a917b765b5a (patch)
tree639a0f6023fb0b8148a87fb9bbd1387e00e7a90d
parent38c9ebc29d7d590280ed2487bb88031c6542f903 (diff)
Fix error under KDE+Wayland where keystrokes tend to be repeated
see also: fltk-rs/fltk-rs#1539
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 115f9765c..c8bbcefb0 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -770,6 +770,9 @@ static void wl_keyboard_key(void *data, struct wl_keyboard *wl_keyboard,
}
} else {
remove_int_vector(key_vector, for_key_vector);
+ // Under KDE, the time value received doesn't change at each keystroke as it should,
+ // so we remove any key repeat timer at each FL_KEYUP event.
+ Fl::remove_timeout((Fl_Timeout_Handler)key_repeat_timer_cb);
}
Fl::e_text = buf;
Fl::e_length = (int)strlen(buf);