Problem with focusing (:on-click) when changing vscreens.

Erik Enge erik at nittin.net
Tue Mar 25 17:54:01 UTC 2003


Using the latest CVS version:

Say I have four virtual screens.  On screen one I have none or several
windows (doesn't seem to affect the behaviour).  On screen two I have an
xterm running (or Mozilla, or Emacs, again, this doesn't seem to
matter).  If I switch from virtual-screen one to virtual-screen two[1]
the xterm gets the focus every time I enter virtual-screen two.  This is
as expected.

Now, if I am on virtual-screen two and start a new xterm[2] and then
switch to virtual-screen one using my keycombo /without/ clicking in the
xterm window the problem shows upon returning to virtual-screen two.
The new xterm (which should be focused, because it was the one that was
focused when I left virtual-screen two) is not focused, it is the first
xterm that has the focus.

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?

I guess this would only show up under :on-click, which is what I am
using.

Erik.

Footnotes: 
[1]  I use a custom keystroke:

;; Circulate virtual screens

(define-key-combo :switch-screen-left
    :keys '(:p)
    :modifiers '(:and :alt-left :control-left))

(define-key-combo :switch-screen-right
    :keys '(:n)
    :modifiers '(:and :alt-left :control-left))

[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" '())) ()))






More information about the eclipse-devel mailing list