Re: [Sawfish] Activate workspace if 'focus-windows-when-mapped set patch

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


Hi,

On Tue, 3 Apr 2012 02:50:20 +0200
wrote fuchur <flohtransporter@xxxxxxxxx>:

>Hi,
>
>On Tue, 3 Apr 2012 00:36:49 +0200
>wrote fuchur <flohtransporter@xxxxxxxxx>:
>
>>Ok, with this small changes your patch here works perfect.
>
>Ups. Here the patch can crash sawfish (window drawing) and i don't know
>why.
>

This one works, i hope ...

-- 
Regards,
Fuchur

GPG Fingerprint: CA3B 8204 5B3E 6D48 6D53  C116 E5BC 70D5 B8D7 B2B0
--- sawfish/lisp/sawfish/wm/state/transient.jl.orgi
+++ sawfish/lisp/sawfish/wm/state/transient.jl
@@ -163,8 +163,10 @@
   ;;    or non-transients may get focus depending on options (yes, we
   ;;    also handle non-transients).
   (define (transient-map-window w)
+    (require 'sawfish.wm.workspace)
     (when (and (window-really-wants-input-p w)
-               (window-visible-p w)
+               (or (window-visible-p w)
+                   (window-workspaces w))
                (or (let ((focus (input-focus)))
                      (and focus (transient-of-p w focus #:allow-root t)))
                    (let ((x-for-id (window-transient-p w)))
@@ -177,6 +179,10 @@
                                (not (window-get w 'never-focus))
                                (not (window-get w 'inhibit-focus-when-mapped)))
                               (window-get w 'focus-when-mapped))))))
+      (unless (window-get w 'sticky)
+        (when (not (eq (car (window-in-workspace-p w current-workspace))
+                       (car (window-workspaces w))))
+          (select-workspace (car (window-workspaces w)))))
       (set-input-focus w)))
 
   ;; If a transient window gets unmapped that currently has the input

Attachment: signature.asc
Description: PGP signature



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