From 3e410bda485a9b3af630ce727717e628f8e6bf9e Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 9 Feb 2008 04:12:32 -0500 Subject: [PATCH] grab the server during composite rendering --- loco/paint.c | 5 +++++ loco/window.c | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/loco/paint.c b/loco/paint.c index dc87f08f..aca112d2 100644 --- a/loco/paint.c +++ b/loco/paint.c @@ -59,6 +59,9 @@ void paint_everything(LocoScreen *sc) int ret; LocoList *it; + XGrabServer(obt_display); + XSync(obt_display, FALSE); + /* XXX if (full_redraw_required) */ glClear(GL_COLOR_BUFFER_BIT); @@ -98,5 +101,7 @@ void paint_everything(LocoScreen *sc) } glXSwapBuffers(obt_display, sc->overlay); + XUngrabServer(obt_display); + loco_screen_redraw_done(sc); } diff --git a/loco/window.c b/loco/window.c index 7f072256..9585ba5c 100644 --- a/loco/window.c +++ b/loco/window.c @@ -184,12 +184,8 @@ static void pixmap_create(LocoWindow *lw) if (lw->pixmap) return; /* make sure the window exists */ - XGrabServer(obt_display); - XSync(obt_display, FALSE); - if (!XCheckIfEvent(obt_display, &ce, look_for_destroy, (XPointer)&lw->id)) lw->pixmap = XCompositeNameWindowPixmap(obt_display, lw->id); - XUngrabServer(obt_display); } static void texture_create(LocoWindow *lw) @@ -201,8 +197,7 @@ static void texture_create(LocoWindow *lw) }; if (lw->glpixmap) return; - - g_assert(lw->pixmap); + if (!lw->pixmap) return; if (!lw->screen->glxFBConfig[lw->depth]) { g_print("no glxFBConfig for depth %d for window 0x%lx\n", -- 2.39.2