Focus without raising windows

Dear sawfish developers,

since focusing a window without also raising it is the desired
behaviour with the RISC-OS alike ROX Desktop Environment, I was
looking for a possibility to do this with sawfish, the window manager
of my choice ;) I ended up writing a new pseudo raise-function for
which I have two simple patches attached. Maybe you can use them in
your next releases.

--- autoload.jl.old	2008-03-12 00:25:31.000000000 +0100
+++ autoload.jl	2008-03-12 00:22:28.000000000 +0100
@@ -98,6 +98,7 @@
 (autoload-command (quote raise-and-pass-through-click) (quote sawfish.wm.commands.raise-commands))
 (autoload-command (quote raise-and-pass-through-click-if-focused) (quote sawfish.wm.commands.raise-commands))
 (autoload-command (quote raise-or-pass-through-click) (quote sawfish.wm.commands.raise-commands))
+(autoload-command (quote focus-and-pass-through-click) (quote sawfish.wm.commands.raise-commands))
 (autoload-command (quote raise-window-and-pass-through-click) (quote sawfish.wm.commands.raise-commands) #:class 'advanced)
 (autoload-command (quote raise-group-and-pass-through-click) (quote sawfish.wm.commands.raise-commands) #:class 'advanced)
 (autoload-command (quote raise-transients-and-pass-through-click) (quote sawfish.wm.commands.raise-commands) #:class 'advanced)
--- raise-commands.jl.old	2008-02-18 23:46:42.000000000 +0100
+++ raise-commands.jl	2008-03-12 00:16:41.000000000 +0100
@@ -61,6 +61,12 @@
 	(maybe-raise-window w)
       (replay-pointer w)))
+  (define (focus-pass-through-click w)
+    "Focus the window that received the current event, then replay any pointer
+events that invoked the command."
+    (when (windowp w))
+    (replay-pointer w))
   (define-command 'raise-and-pass-through-click
     and-pass-through-click #:spec "%W")
@@ -68,6 +74,8 @@
     and-pass-through-click-if-focused #:spec "%w")
   (define-command 'raise-or-pass-through-click
     or-pass-through-click #:spec "%w")
+  (define-command 'focus-and-pass-through-click
+    focus-pass-through-click #:spec "%w")
 ;;; these should probably be considered obsolete

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]