Re: rename-window change



KDE/XFCE also use WM_NAME and WM_ICON_NAME.

diff --git a/lisp/sawfish/wm/windows.jl b/lisp/sawfish/wm/windows.jl
index 0fb5c29..bbddd13 100644
--- a/lisp/sawfish/wm/windows.jl
+++ b/lisp/sawfish/wm/windows.jl
@@ -543,10 +543,13 @@ STATES has been changed. STATES may also be a single symbol."
 
   (define (rename-window-func window new-name)
     "Renames the WINDOW to NEW-NAME."
-    (set-x-text-property window 'WM_NAME (vector new-name))
-    (set-x-text-property window '_NET_WM_NAME (vector new-name))
-    (set-x-text-property window 'WM_ICON_NAME (vector new-name))
-    (set-x-text-property window '_NET_WM_ICON_NAME (vector new-name)))
+    (unless (string-match desktop-environment "none")
+        (progn (set-x-text-property window 'WM_NAME (vector new-name))
+	       (set-x-text-property window 'WM_ICON_NAME (vector new-name))))
+      ;; XXX doesn't have any effect?
+      (set-x-text-property window '_NET_WM_VISIBLE_NAME (vector new-name))
+      (set-x-text-property window '_NET_WM_NAME (vector new-name))
+      (set-x-text-property window '_NET_WM_ICON_NAME (vector new-name)))
 
   (define (rename-window-interactive w)
     (require 'sawfish.wm.util.prompt)
diff --git a/man/news.texi b/man/news.texi
index 5c666a4..e62a5f6 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -36,6 +36,10 @@ next workspace are now bundled in the new @code{Workspace} sub-menu.
 
 @item Sawfish emacs major-mode now indents let-fluids [Teika Kazura]
 
+ item @code{rename-window} function change [Christopher Bratusek]
+ code{rename-window} now also changes _NET_WM_VISIBILBE_NAME property.
+WM_NAME and WM_ICON_NAME are only changed, if @code{desktop-environment} is @code{gnome}.
+
 @item Translation related changes [Teika Kazura]
 
 @itemize +


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]