diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c index 703a0fa22..b84cfdd4c 100644 --- a/hw/dmx/dmxextension.c +++ b/hw/dmx/dmxextension.c @@ -2013,8 +2013,16 @@ dmxAttachScreen (int idx, FindAllClientResources(clients[i], dmxBECreateResources, (pointer)idx); + /* Grab back-end server while creating window tree and window + properties to prevent race conditions in back-end server + clients */ + XGrabServer (dmxScreen->beDisplay); + /* Create window hierarchy (top down) */ dmxBECreateWindowTree(idx); + dmxBECreateWindowProperties(idx); + + XUngrabServer (dmxScreen->beDisplay); #ifdef RENDER /* Restore the picture state for RENDER */ @@ -2030,8 +2038,6 @@ dmxAttachScreen (int idx, dmxBERestoreRenderGlyph,(pointer)idx); #endif - dmxBECreateWindowProperties(idx); - /* Refresh screen by generating exposure events for all windows */ dmxForceExposures(idx);