[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
key release event "leaked"
From: |
cage |
Subject: |
key release event "leaked" |
Date: |
Tue, 9 May 2023 18:19:07 +0200 |
Hi!
I do not know if the behaviour is a bug or not so I am sending this
message here.
When the screen is split (vertically or horizontally, it does not
matter), in my case using 'C-p 3', the event "the key for number '3'
has been pressed" is captured by the WM but the event that immediately
follows: "the key for number '3' has been released", is not captured
and "leaks" to the widget that has the focus in the application that
had the focus.
To better illustrate this behaviour I have written this brief
function (TK interpreter (wish) is needed):
-----------✀-----------✀-----------✀-----------
(ql:quickload "nodgui")
(defun main ()
(nodgui:with-nodgui ()
(let ((entry (make-instance 'nodgui:entry)))
(nodgui:bind entry
"<KeyRelease>"
(lambda (e) (format t "keyrelease ~s~%" e)))
(nodgui:bind entry
"<KeyPress>"
(lambda (e) (format t "keypress ~s~%" e)))
(nodgui:grid entry 0 0)
(nodgui:focus entry))))
-----------✀-----------✀-----------✀-----------
after loading this code and calling the function 'main' a simple
window with a text entry is shown, the entry get the focus.
Splitting the screen will fire the event "<KeyRelease>" (I do not know
the way this event is called in the X11 protocol, so I am using the
TCL/TK term) and the event is printed on *standard-output*, you will
see that the event has a char slot that has a value of '3' or '2'
depending of the splitting command.
I am not sure that this could be considered a bug, that is, the key
release should be swallowed by stumpwm together with the "keypress"
event, or it is up to the GUI application to deal with this spurious
"keyrelease" events.
Looking forward for your opinion!
Bye!
C.
- key release event "leaked",
cage <=