|Browse all patches|
Dagfinn Ilmari Mannsåker (Original Author)
Christopher Bratusek (Update against 1.3.3)
Timo Korvola (Simplyfied Code)
taken from: http://bugzilla.gnome.org/show_bug.cgi?id=72238
This patch defines a new focus mode, the union of enter-only and click.
This is useful when one wishes to focus a window that has the mouse pointer in it (this occurs frequently when the mouse pointer is not warped to focuesd/cycled windows)
Patch testing Edit
- Copy/paste the patch listed below into some file, eg.
- If you don't have sawfish sources yet, have one, as described get it from GIT repo.
- Go into the directory where sawfish sources reside, eg.
- Test if the patch applies cleanly with this command:
patch -p1 --ignore-whitespace --dry-run < TEST.diffin case of problems try also:
- If it applies cleanly, then remove the
--dry-runfrom above command and run it again, otherwise ask on the mailing list.
- Compile sawfish:
./autogen.sh && make
- Install it for testing, but it depends on your linux distribution.
- It is always better to install sawfish as your distribution package, but it is different for each distribution.
- So you may try
make install, which will install sawifish in
/usr/local/share/sawfish/(if you have write access). But then make sure that you run the correct version and delete it from that directory afterwards, to avoid any conflicts.
- Se also
PS: edit this template if you feel that those instructions can be improved.
--- lisp/sawfish/wm/focus.jl 2008-05-25 08:51:07.570665669 +0200 +++ lisp/sawfish/wm/focus.jl 2008-05-25 08:54:25.780965799 +0200 @@ -213,6 +213,14 @@ (eq w (input-focus))) (focus-push-map w click-to-focus-map)))))) + (define-focus-mode 'enter-click + (lambda (w action . args) + (case action + ((pointer-in warp-if-necessary) + (apply (focus-mode-ref 'enter-only) w action args)) + ((focus-in focus-out add-window before-mode-change after-mode-change) + (apply (focus-mode-ref 'click) w action args))))) + � ;;; hooks
Community's reasons for inclusion or rejection Edit
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.
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: ~~~~.
- vote: yes. The idea is good, but the implementation is a bit copy-pastey. Here is a version that defers to the existing modes (and warps the pointer like enter-only). Tkorvola 15:36, 20 June 2008 (UTC)
- Ok, I just updated the patch with your code. [I tried it out and found no problems] Flashrider [Christopher Bratusek] 07:51, 22 June 2008 (UTC)
- vote: yes. It indeed solves the annoyance of changing focus by cycling and finding you have to do weird mouse moves. New version looks clean. GSR 23:21, 26 June 2008 (UTC)
- vote: yes. Works well, applied, thanks. Janek Kozicki 09:46, 4 August 2008 (UTC)