summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-07-18 15:04:36 -0400
committerDana Jansens <danakj@orodu.net>2007-07-18 15:04:36 -0400
commit73b3838d5e22b209143ab236a2b329aa9be65475 (patch)
tree12205275c157c511796b3aab9143391302fc0306 /openbox
parent1215fbee409980809516c45aa3407668945d9f5d (diff)
Grab the server when mapping a client and frame, to avoid race conditions
Diffstat (limited to 'openbox')
-rw-r--r--openbox/frame.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbox/frame.c b/openbox/frame.c
index 8f28526b..7bcd420f 100644
--- a/openbox/frame.c
+++ b/openbox/frame.c
@@ -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);
}
}