Wikia

Sawfish

Refresh icons

773pages on
this wiki
Talk0
Browse all patches

Author Edit

Timo Korvola

Synopsis Edit

The Crux theme uses miniature versions of client icons in the window menu buttons. The scaled pixmaps are cached and are not updated if a client changes its icon. This patch fixes that.

You can also get this patch with Git from http://www.elisanet.fi/tkorvola/sawfish.git, branch icon-refresh.

Patch testing Edit

  1. Copy/paste the patch listed below into some file, eg. TEST.diff.
  2. If you don't have sawfish sources yet, have one, as described get it from GIT repo.
  3. Go into the directory where sawfish sources reside, eg. cd sawfish
  4. Test if the patch applies cleanly with this command:
    patch -p1 --ignore-whitespace --dry-run < TEST.diff
    in case of problems try also: -p0 or -p2
  5. If it applies cleanly, then remove the --dry-run from above command and run it again, otherwise ask on the mailing list.
  6. Compile sawfish: ./autogen.sh && make
  7. Install it for testing, but it depends on your linux distribution.
    1. It is always better to install sawfish as your distribution package, but it is different for each distribution.
    2. 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.
  8. Se also

PS: edit this template if you feel that those instructions can be improved.

Patch Edit

diff --git a/themes/Crux/theme.jl b/themes/Crux/theme.jl
index 50d1688..d55a3bb 100644
--- a/themes/Crux/theme.jl
+++ b/themes/Crux/theme.jl
@@ -417,6 +417,10 @@
 (define (reframe-all)
   (reframe-windows-with-style 'Crux))
 
+(define (reset-icon w)
+  (table-unset icon-table w)
+  (rebuild-frame w))
+
 (define (color-changed)
   (recolor-all)
   (reframe-all))
@@ -458,3 +462,6 @@
 
 ;; recalibrate frames when the window-name changes
 (call-after-property-changed '(WM_NAME _NET_WM_NAME) rebuild-frame)
+
+;; Konqueror changes the icon by page.
+(call-after-property-changed 'WM_HINTS reset-icon)

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: ~~~~.

  • Yes vote: yes. Not a great many clients change their icons but Konqueror does that a lot, as it uses icons from the web pages. -- Timo Korvola
  • Yes vote: yes. Patch applied, thanks. Janek Kozicki 10:21, 4 August 2008 (UTC)

Around Wikia's network

Random Wiki