summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-06-23 08:05:53 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-06-23 08:05:53 +0200
commit7a35e256bc2c57b41c595fb2c5a46d61bb5fc68f (patch)
treebaeefaf459ae756084e708e6e43c82cd0d113259
parent115ae94de08a75b61afa2828c818dd3a85a886e1 (diff)
Wayland: stop key repeats when focus leaves a window
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 8998d4758..d5850e1a3 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -844,6 +844,7 @@ static void wl_keyboard_leave(void *data, struct wl_keyboard *wl_keyboard,
struct Fl_Wayland_Screen_Driver::seat *seat = (struct Fl_Wayland_Screen_Driver::seat*)data;
//fprintf(stderr, "keyboard leave fl_win=%p\n", Fl_Wayland_Window_Driver::surface_to_window(surface));
seat->keyboard_surface = NULL;
+ last_keydown_serial = 0;
Fl_Window *win = Fl_Wayland_Window_Driver::surface_to_window(surface);
if (!win && Fl::focus()) win = Fl::focus()->top_window();
if (win) Fl::handle(FL_UNFOCUS, win);