From a5738a5ec7c5a109377a6e5ca70ca47672ad5d6a Mon Sep 17 00:00:00 2001 From: David Reveman Date: Fri, 26 Sep 2008 16:32:33 -0400 Subject: [PATCH] Don't wait for sync replies when closing down server. Use dmxScreenReplyCheckSync in dmxDisableScreen to unsure that no pending sync replies exist for the disabled screen. --- hw/dmx/dmxextension.c | 9 +++++++++ hw/dmx/dmxinit.c | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c index eb2c346ee..2f2bceb0f 100644 --- a/hw/dmx/dmxextension.c +++ b/hw/dmx/dmxextension.c @@ -2113,6 +2113,15 @@ dmxDisableScreen (int idx) /* Screen is now disabled */ dmxScreen->beDisplay = NULL; + /* Make sure we don't have any pending sync replies */ + if (!dmxScreen->broken) + { + static xcb_generic_error_t detached_error = { 0, DMX_DETACHED }; + + dmxScreenReplyCheckSync (pScreen, 0, (xcb_generic_reply_t *) + &detached_error); + } + #ifdef RANDR RRGetInfo (screenInfo.screens[0]); #endif diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c index c740dd9c4..478d63ff0 100644 --- a/hw/dmx/dmxinit.c +++ b/hw/dmx/dmxinit.c @@ -353,9 +353,6 @@ void dmxCloseDisplay(DMXScreenInfo *dmxScreen) { RemoveEnabledDevice (dmxScreen->fd); - /* make sure all pending sync replies are processed */ - dmxSync (dmxScreen, TRUE); - if (dmxScreen->atomTable) xfree (dmxScreen->atomTable); if (dmxScreen->beAtomTable)