FLTK logo

[master] 6d21285 - Fix error under KDE+Wayland where keystrokes tend to be repeated

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 6d21285 - Fix error under KDE+Wayland where keystrokes tend to be repeated "ManoloFLTK" 03:02 Apr 25  
 
commit 6d21285e0f7462cc1d98c92242cd4a917b765b5a
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Thu Apr 25 11:52:06 2024 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Thu Apr 25 11:52:06 2024 +0200

    Fix error under KDE+Wayland where keystrokes tend to be repeated
    
    see also: fltk-rs/fltk-rs#1539

 src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 3 +++
 1 file changed, 3 insertions(+)

diff --git src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 115f976..c8bbcef 100644
--- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ 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);
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.