Sawfish
(cleanup.)
Line 7: Line 7:
 
== Synopsis ==
 
== Synopsis ==
   
  +
This patch is rejected in 2008. You can see the patch and the discussion [http://sawfish.wikia.com/index.php?title=Focus_window_without_raise&oldid=7083 here].
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. I ended up adding a new pseudo raise-function which I call "focus-and-pass-through-click" by cloning "raise-and-pass-through-click" without the raise command.
 
   
  +
What made the author suffer is that clicking raises windows. You can fix it as follows:
== Patch testing ==
 
<!-- IMPORTANT: if patch testing instructions are different than the default ones - please replace them with correct instructions --> {{Patch testing}}
 
   
  +
Open the configurator, choose "binding", and "window keymap". If "Button1-click" is bound to "raise-window-and-pass-through-click", then unbind it.
== Patch ==
 
   
 
If you're window is raised by focusing, open the configurator "Focus" -&gt; "auto raise". If that item isn't there, add {{Codeline|(require 'sawfish.wm.ext.auto-raise)}} in your {{path|~/.sawfish/rc}}. Then uncheck the top item.
<pre>
 
--- sawfish-1.3.3.orig/lisp/sawfish/wm/autoload.jl 2007-07-29 11:45:04.000000000 +0200
 
+++ sawfish-1.3.3/lisp/sawfish/wm/autoload.jl 2008-03-12 15:06:36.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)
 
   
  +
[[Category:Rejected Patches]]
--- sawfish-1.3.3.orig/lisp/sawfish/wm/commands/raise-commands.jl 2007-07-29 11:45:04.000000000 +0200
 
  +
[[Category:Rejected Patches]]
+++ sawfish-1.3.3/lisp/sawfish/wm/commands/raise-commands.jl 2008-03-12 15:06:47.000000000 +0100
 
  +
[[Category:Rejected Patches]]
@@ -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)))
 
+
 
;;###autoload
 
(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
 
</pre>
 
 
== Community's reasons for inclusion or rejection ==
 
<small>Patch submitters, please vote also! Yes, obviosuly your vote will be positive, but it's the place to give your explanation why this patch is good for all Sawfish users, and why it is correct - good reasons for inclusion. </small>
 
 
<small>When voting anonymously please write your name, so that it can be associated with your posts on the mailing list. If you are logged in you can sign yourself by typing four tilda characters: '''''<nowiki>~~~~</nowiki>'''''.</small>
 
 
*{{wtf}} Vote: pondering. - I don't know if this is necessary. I guess your focus mode is 'click', and you had binded 'Mouse1-click' to 'raise-and-pass-through-click' in the 'window' context. If so, simply unbinding 'Mouse1-click' must work. I tried and found that a mouse click is correctly passed to the window. Could you please test it? (I have fixed your patch, by rearranging a parenthesis.) - [[User:Teika kazura|Teika kazura]] 04:44, 28 June 2008 (UTC)
 
 
* {{wtf}} I agree with Teika, the problem looks more like a config issue. Non handled events are just passed untouched, so unbinding should work as expected, Sawfish does not force raises (I have been using enter focus mode for years without autoraises). [[User:GSR|GSR]] 21:37, 15 July 2008 (UTC)
 
 
* {{no}} Better to reconfigure your sawfish binding, than to apply your patch&nbsp;;) In fact that's the configuration I'm currently using on my ROX+sawfish desktop (focus without raise, enter+click focus). But thank you for your effort. [[User:Janek Kozicki|Janek Kozicki]] 15:34, 4 August 2008 (UTC)
 
 
*{{yes}} Please include this! cyber_rigger This is just what I have been looking for. Years ago I was customizing sawfish bindings to behave something like olvwm, so windows would NOT rise when you clicked them. This is just what I have been looking for. http://perfectwm.blogspot.com/ [[User:75.109.220.54|75.109.220.54]] 22:18, 19 November 2009 (UTC)
 
**Hi. Since this patch was decided to be rejected once, please refute the comments above, and clarify that it's necessary. Thank you very much, anyway, for your comments!- [[User:Teika kazura|Teika kazura]] 07:12, November 21, 2009 (UTC)
 
**I'm trying to have a gnome compatible window manager so that when you click on the contents of the window the window stays put, it does NOT rise to cover other windows. Most people have not used such a window manager and have not yet realized the advantages of it. It makes it a lot easier to handle a bunch of windows. It is roughly equivalent to doubling the screen area. The PROBLEM is that some applications rise to the front own their own. For example, when switching from&nbsp; a gnome-terminal to Firefox, Firefox decides to jump in front of the other windows, hiding their view -- even though the window manager didn't tell it to. I didn't ask for that. I just want to change focus and make that window stay where it is, stay behind that other window. If you want to get the feel of a non-rise window manager play around with olvwm. Most people go from "why do you want to do that" to "that's pretty cool". Once you get used to it you don't want to go back.
 
***I mean, you can already do it with Sawfish configuration, so the patch is not necessary, no? - [[User:Teika kazura|Teika kazura]] 04:30, November 24, 2009 (UTC)
 
****If all the applications behaved, yes, BUT several of them don't. They rise on focus anyway. I have experimented with available sawfish bindings, such as nop&nbsp; and was able to prevent the rogue window rise. The problem is that this makes the the window manager unusable. The missing link that I need is to pass-through the click WITHOUT raising the window,
 
*** Open the configurator "Focus" -&gt; "auto raise". If that item isn't there, add {{Codeline|(require 'sawfish.wm.ext.auto-raise)}} in your {{path|~/.sawfish/rc}}. Then uncheck the top item. I guess this solves. - [[User:Teika kazura|Teika kazura]] 06:02, December 12, 2009 (UTC)
 

Revision as of 06:17, 15 December 2009

Browse all patches

Author

Rüdiger Otte

Synopsis

This patch is rejected in 2008. You can see the patch and the discussion here.

What made the author suffer is that clicking raises windows. You can fix it as follows:

Open the configurator, choose "binding", and "window keymap". If "Button1-click" is bound to "raise-window-and-pass-through-click", then unbind it.

If you're window is raised by focusing, open the configurator "Focus" -> "auto raise". If that item isn't there, add (require 'sawfish.wm.ext.auto-raise) in your ~/.sawfish/rc. Then uncheck the top item.