Re: [Sawfish] Bugreport by gentoo

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


On Thu, 8 Sep 2011 23:31:51 +0300, Timo Korvola wrote:
> A fix is available at http://koti.welho.com/thk/sawfish.git, branch 
> icccm-selection.

Let me send the patch here for those who don't have git access.
Thank you very much womble for your hard analysis, and Timo for
your answer.

Teika (Teika kazura)
commit 3df9fa36e731f941aa1f83b1fa38a4b18489aed8
Author: Timo Korvola <tkorvola@xxxxxx>
Date:   Thu Sep 8 22:51:56 2011 +0300

    Fix a bug in manager selection handling.
    
    Set all required fields of the client message event.
    Call XSync before changing the error handler.

diff --git a/src/display.c b/src/display.c
index 54a74a2..64b6611 100644
--- a/src/display.c
+++ b/src/display.c
@@ -336,6 +336,8 @@ acquire_manager_selection(Window sel_owner)
                 break;
         }
     }
+    cm.type = ClientMessage;
+    cm.window = root_window;
     cm.message_type = xa_manager;
     cm.format = 32;
     cm.data.l[0] = startup_time;
@@ -448,6 +450,7 @@ sys_init(char *program_name)
 
             acquire_manager_selection (sel_owner);
 
+	    XSync (dpy, False);
 	    XSetErrorHandler (error_other_wm);
 	    XSelectInput (dpy, root_window, ROOT_EVENTS);
 	    XSync (dpy, False);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/