WM_WINDOW_ROLE

Olivier Fourdan fourdan at xfce.org
Tue Nov 23 07:38:08 CET 2004


Hi Benny

Ok, seems to make sense. Applied.

Thanks
Olivier.

On Tue, 2004-11-23 at 02:49 +0100, Benedikt Meurer wrote:
> Olivier,
> 
> If I understand the ICCCM correctly, xfwm4 doesn't treat the 
> WM_WINDOW_ROLE property correct. xfwm4 grabs WM_WINDOW_ROLE from the 
> client leader window instead of the toplevel window itself, but the 
> ICCCM says:
> 
> "The client must set the WM_WINDOW_ROLE property to a string that 
> uniquely identifies that window among all windows that have the same 
> client leader window."
> 
> So, WM_WINDOW_ROLE should be used to distinguish windows with the same 
> client leader, and therefore shouldn't be taken from the client leader, 
> but the toplevel window in question.
> 
> Attached is a simple patch that fixes the problem (and thereby the 
> problems related to legacy session management and restoring windows on 
> the wrong workspace).
> 
> regards,
> Benedikt
> plain text document attachment (wm_window_role.patch)
> Index: session.c
> ===================================================================
> RCS file: /var/cvs/xfce/xfce4/xfwm4/src/session.c,v
> retrieving revision 1.22
> diff -u -r1.22 session.c
> --- session.c	28 Aug 2004 23:10:17 -0000	1.22
> +++ session.c	23 Nov 2004 01:43:54 -0000
> @@ -269,7 +269,7 @@
>      {
>          if (c->client_leader != None)
>          {
> -            getWindowRole (clientGetXDisplay (c), c->client_leader, &window_role);
> +            getWindowRole (clientGetXDisplay (c), c->window, &window_role);
>          }
>          else
>          {
> @@ -554,7 +554,7 @@
>          /* client_id's match */
>          if (c->client_leader != None)
>          {
> -            getWindowRole (clientGetXDisplay (c), c->client_leader, &window_role);
> +            getWindowRole (clientGetXDisplay (c), c->window, &window_role);
>          }
>          else
>          {
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://lunar-linux.org/mailman/listinfo/xfce4-dev




More information about the Xfce4-dev mailing list