Problem with focusing (:on-click) when changing vscreens.
Iban Hatchondo
hatchond at labri.fr
Wed Mar 26 06:44:00 UTC 2003
Erik Enge wrote:
[ ... ]
> Using the latest CVS version:
> The problem goes away if I click with my mouse in the newly created
> xterm window before leaving virtual-screen two; upon returning, this
> xterm is now focused and all is as expected.
>
> The solution might lay in `change-vscreen` (widgets.lisp) but I'm unable
> to see it. Perhaps someone else would be able to shed some light on
> this?
It seems the problem comes as you suspect from the keystroke :statr-xterm.
Apparently, it interfere with the focus-in event we receive next.
As you said we could fix this by calling restack-window in
change-vscreen, but it
may point out a deeper problem. So I would try another solution, but I
am not completely sure. Could try to replace the
(event-process ((event keyboard-event) (root root)) ..) in input.lisp by
(defmethod event-process ((event keyboard-event) (root root))
(with-slots (code state) event
(let ((callback (lookup-keystroke code state)))
(when callback
(xlib:allow-events *display* :async-keyboard)
(funcall callback event)))))
Note the allow-events that now appear. It should fix our problem, but
I think it should also be more correct that way (in case this interfere
with more than what we though).
Iban.
> Footnotes:
> [2] I use a custom keystroke for this too:
>
> ;; Application shortcuts
>
> (define-key-combo :start-xterm
> :keys '(:x)
> :modifiers '(:and :alt-left :control-left)
> :fun (action (:press (%run-program% "xterm" '())) ()))
>
(defmethod event-process ((event keyboard-event) (root root))
(with-slots (code state) event
(let ((callback (lookup-keystroke code state)))
(when callback
(xlib:allow-events *display* :async-keyboard)
(funcall callback event)))))
More information about the eclipse-devel
mailing list