Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
|Browse all patches|
Martin Mares, email@example.com
When an application sets the WM_CLASS property in a way that it contains only the application name, but no class, Sawfish catches a bad argument signal and leaves the window undecorated. This happens for example with version 7.0 of Mathematica. I have hunted the problem down to two calls of aref on the string array representing WM_CLASS. The fix is simple: always check that the array has at least two elements when asking for the 2nd one.
Index: lisp/sawfish/wm/ext/match-window.jl =================================================================== --- lisp/sawfish/wm/ext/match-window.jl (revision 4402) +++ lisp/sawfish/wm/ext/match-window.jl (working copy) @@ -312,7 +312,7 @@ - (define-match-window-formatter 'WM_CLASS (lambda (vec) - (format nil "%s/%s" (aref vec 1) (aref vec 0)))) + (format nil "%s/%s" (and (> (length vec) 1) (aref vec 1)) (aref vec 0)))) - (define-match-window-formatter 'WM_COMMAND (lambda (vec) Index: lisp/sawfish/wm/windows.jl =================================================================== --- lisp/sawfish/wm/windows.jl (revision 4402) +++ lisp/sawfish/wm/windows.jl (working copy) @@ -201,7 +201,7 @@ "Return the class that window W belongs to, as a string. Returns `nil' if W has no associated class." (let ((prop (get-x-text-property w 'WM_CLASS))) - (and prop (aref prop 1)))) + (and prop (> (length prop) 1) (aref prop 1)))) - (define (get-window-wm-protocols w) "Return a list of symbols defining the X11 window manager protocols
Community's reasons for inclusion or rejection Edit
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: ~~~~.</small>
- Please vote with: vote: yes., vote: no., vote: let's try in experimental., vote: pondering. or wait for next release.
vote: yes. The bug is really in Mathematica but unfortunately we cannot fix it there and have to settle for this. The diff appears to be broken so I had to apply it by hand. Formatting could be improved by adding newlines to break long lisp expressions. Tkorvola 19:11, 9 March 2009 (UTC)
- vote: yes. commited Flashrider [Christopher Bratusek] 08:52, 2 May 2009 (UTC)