]> Dogcows Code - chaz/openbox/commitdiff
Grab the server when mapping a client and frame, to avoid race conditions
authorDana Jansens <danakj@orodu.net>
Wed, 18 Jul 2007 19:04:36 +0000 (15:04 -0400)
committerDana Jansens <danakj@orodu.net>
Wed, 18 Jul 2007 19:04:36 +0000 (15:04 -0400)
openbox/frame.c

index 8f28526b6ba6f10b901fc1be7b26abc8c40c6433..7bcd420f2c3c8e6a4ece24257d80041b831cfabf 100644 (file)
@@ -249,8 +249,13 @@ void frame_show(ObFrame *self)
     if (!self->visible) {
         self->visible = TRUE;
         framerender_frame(self);
+        /* Grab the server to make sure that the frame window is mapped before
+           the client gets its MapNotify, i.e. to make sure the client is
+           _visible_ when it gets MapNotify. */
+        grab_server(TRUE);
         XMapWindow(ob_display, self->client->window);
         XMapWindow(ob_display, self->window);
+        grab_server(FALSE);
     }
 }
 
This page took 0.026811 seconds and 4 git commands to generate.