Hi,
The attached patch makes the CLX backend cooperate better with X11 window managers by marking frames as top-level windows.
Juliusz
Juliusz Chroboczek jch@pps.jussieu.fr writes:
The attached patch makes the CLX backend cooperate better with X11 window managers by marking frames as top-level windows.
Thank you; I've merged this, but I have some questions...
Index: Backends/CLX/port.lisp
RCS file: /project/mcclim/cvsroot/mcclim/Backends/CLX/port.lisp,v retrieving revision 1.137 diff -u -r1.137 port.lisp --- Backends/CLX/port.lisp 18 Feb 2009 17:34:44 -0000 1.137 +++ Backends/CLX/port.lisp 2 Mar 2009 21:03:36 -0000 @@ -456,7 +462,14 @@ (setf (xlib:wm-hints window) (xlib:make-wm-hints :input :on)) (setf (xlib:wm-name window) (frame-pretty-name frame)) (setf (xlib:wm-icon-name window) (frame-pretty-name frame))
(setf (xlib:wm-protocols window) `(:wm_delete_window)))))
(xlib:set-wm-class
window
(string-downcase (frame-name frame))
(string-capitalize (string-downcase (frame-name frame))))
This WM_CLASS is the same thing as is looked up in the Xresources database, isn't it? Does it have any other effect? Do window managers group windows by either of these names?
(setf (xlib:wm-protocols window) `(:wm_delete_window))
(xlib:change-property window
:WM_CLIENT_LEADER (list (xlib:window-id window))
:WINDOW 32))))
Here, we make each window its own leader, right? What effect would this have on multiple windows opened by a single client (such as those opened with open-window-stream)? Would it be better to have those child windows have their WM_CLIENT_LEADER be the parent application frame?
Best,
Christophe
Hi Christophe,
Could you please whitelist the addresses
jch@pps.jussieu.fr Juliusz.Chroboczek@pps.jussieu.fr
for the mcclim list?
This WM_CLASS is the same thing as is looked up in the Xresources database, isn't it?
Yes.
Does it have any other effect? Do window managers group windows by either of these names?
In principle, no. If you run two Emacs instances, both have the same class name, and you don't expect the window manager to group them.
(setf (xlib:wm-protocols window) `(:wm_delete_window))
(xlib:change-property window
:WM_CLIENT_LEADER (list (xlib:window-id window))
:WINDOW 32))))
Here, we make each window its own leader, right?
Yep.
What effect would this have on multiple windows opened by a single client (such as those opened with open-window-stream)?
The window manager would treat them as belonging to distinct applications. In particular, if a window manager that only makes a single icon for an application will create multiple icons.
Would it be better to have those child windows have their WM_CLIENT_LEADER be the parent application frame?
It definitely would. My patch does the strict minimum to ensure that every app has at least one icon in the window manager that I use.
Regards,
Juliusz
Juliusz Chroboczek Juliusz.Chroboczek@pps.jussieu.fr writes:
Hi Christophe,
Could you please whitelist the addresses
jch@pps.jussieu.fr Juliusz.Chroboczek@pps.jussieu.fr
for the mcclim list?
Done. Thanks for the discussion below, left untrimmed so that it shows up in the list archives.
Best,
Christophe
This WM_CLASS is the same thing as is looked up in the Xresources database, isn't it?
Yes.
Does it have any other effect? Do window managers group windows by either of these names?
In principle, no. If you run two Emacs instances, both have the same class name, and you don't expect the window manager to group them.
(setf (xlib:wm-protocols window) `(:wm_delete_window))
(xlib:change-property window
:WM_CLIENT_LEADER (list (xlib:window-id window))
:WINDOW 32))))
Here, we make each window its own leader, right?
Yep.
What effect would this have on multiple windows opened by a single client (such as those opened with open-window-stream)?
The window manager would treat them as belonging to distinct applications. In particular, if a window manager that only makes a single icon for an application will create multiple icons.
Would it be better to have those child windows have their WM_CLIENT_LEADER be the parent application frame?
It definitely would. My patch does the strict minimum to ensure that every app has at least one icon in the window manager that I use.
Regards,
Juliusz