Re: [Sawfish] Changing stacking order not considered entering/exiting window..?

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


[sorry for the long delay]

> I tested this on my box (latest GIT HEAD) and it's working fine with
> enter-exit. Maybe some faulty setting? Does it behave normally with
> default configuration?

No it doesn't unfortunately. I tried git HEAD as of today, but the
result is the same.

I start out with the default configuration. Then I configure two
Window keymap bindings with the commands "Lower window" and "Raise
Window". Then I set "enter-exit" focus mode. Next I start two
terminals and place them partly overlapping. Then I move the mouse
pointer into the overlapping area and press some keys on the keyboard
to make sure that I see text appearing in the focused terminal. Next I
press the keybinding triggering "Lower window". This makes the other
terminal pop on top, however the lowered terminal is still in focus,
yet the mouse pointer is in the window which is now on top. So when I
press some more keys the characters still appear in the lowered
window.

After browsing the source, I found code related window stack
manipulation. Basically pointer events are ignored when fiddling
around in the window stack. I'm not really looking for having events
sent continuously while windows are being raised/lowered, just that
the focus ought to correspond to the resulting state after the actions
have been performed. So the following patch fixes my problem, but I'm
convinced you know a more elegant and appropriate solution that does
not throw away what commit 1c544853 added. But as I don't read lisp --
help!?! :)

--- a/lisp/sawfish/wm/commands/x-cycle.jl
+++ b/lisp/sawfish/wm/commands/x-cycle.jl
@@ -289,15 +289,11 @@
                   (catch 'x-cycle-exit
                     ;; do the first step
                     (cycle-next windows step)
-                    (setq focus-ignore-pointer-events t)
                     (recursive-edit))
                   (when (fluid x-cycle-current)
                     (display-window (fluid x-cycle-current))))
               (remove-message)
-              (ungrab-keyboard)
-              (make-timer (lambda ()
-                            (setq focus-ignore-pointer-events nil))
-                          0 100)))))
+              (ungrab-keyboard)))))

       (when tail-command
        ;; make sure that the command operates on the newly-focused

> /maybe I'll add some new group in SawfishConfig that handles editing,
> backup, restore or resetting to factory defaults of configuration?

Sounds like a good idea. That would make testing using the default
configuration significantly easier.

 / Sebastian

-- 
Sawfish ML


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/