Re: Title changes and titlebar updates
- From: Harald van Dijk <truedfx gentoo org>
- To: sawfish-list gnome org
- Subject: Re: Title changes and titlebar updates
- Date: Fri, 25 Jan 2008 21:18:57 +0100
On Fri, Jan 25, 2008 at 04:33:08AM +0100, Gabor Z. Papp wrote:
> * Harald van Dijk <truedfx gentoo org>:
>
> | If this is correct, then I think that the only way (short of nasty
> | hacks in sawfish itself) of actually fixing the bug is making *all*
> | themes use (call-after-property-changed '_NET_WM_NAME ...) as well as
> | the 'WM_NAME variant. If you make this change in your theme yourself,
> | does it work any better? In other words, if the microGUI theme does
>
> | (call-after-property-changed
> | '_NET_WM_NAME (lambda ()
> | (rebuild-frames-with-style 'microGUI)))
> | (call-after-property-changed
> | 'WM_NAME (lambda ()
> | (rebuild-frames-with-style 'microGUI))))
>
> | does anything change, with or without my change to ensure WM_NAME's hook
> | gets called?
>
> If I change the theme, the problem gets fixed.
So to avoid breaking a probably substantial portion of existing themes,
should sawfish do something like attached? It's ugly, and it's a hack,
but I believe it's better than breaking themes without notice...
--- sawfish-1.3.2/themes/Crux/theme.jl
+++ sawfish-1.3.2/themes/Crux/theme.jl
@@ -457,4 +457,4 @@
(add-frame-style 'Crux get-frame)
;; recalibrate frames when the window-name changes
-(call-after-property-changed 'WM_NAME rebuild-frame)
+(call-after-property-changed '(WM_NAME _NET_WM_NAME) rebuild-frame)
--- sawfish-1.3.2/themes/microGUI/theme.jl
+++ sawfish-1.3.2/themes/microGUI/theme.jl
@@ -351,5 +351,5 @@
((shaped-transient) shaped-transient-frame))))
(call-after-property-changed
- 'WM_NAME (lambda ()
+ '(WM_NAME _NET_WM_NAME) (lambda ()
(rebuild-frames-with-style 'microGUI))))
--- sawfish-1.3.2/lisp/sawfish/wm/windows.jl
+++ sawfish-1.3.2/lisp/sawfish/wm/windows.jl
@@ -438,9 +438,12 @@
"Arrange for function FUN to be called with arguments (WINDOW PROPERTY
STATE) when the X11 property named PROP (a symbol) changes. PROP may also
be a list of property names to monitor."
- (setq prop-changes (cons (cons (if (listp prop)
- prop
- (list prop)) fun) prop-changes)))
+ (setq prop-changes (cons (cons (cond
+ ((listp prop) prop)
+ ((= prop 'WM_NAME)
+ (progn (error "(call-after-property-changed 'WM_NAME ...) should probably be (call-after-property-changed '(WM_NAME _NET_WM_NAME) ...); use '(WM_NAME) if you really want only WM_NAME")
+ '(WM_NAME _NET_WM_NAME)))
+ ((t) (list prop))) fun) prop-changes)))
(add-hook 'property-notify-hook
(lambda (w prop state)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]