Remove the handler only if it was installed. Also mark it as
uninstalled, otherwise it wouldn't get reinstalled after a
server reset.

Signed-off-by: Ville Syrjala <[email protected]>
---
 hw/xfree86/common/xf86DGA.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 3cded85..c4b2d7d 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -250,9 +250,10 @@ DGACloseScreen(int i, ScreenPtr pScreen)
 {
    DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
 
-   if (XDGAEventBase) {
+   if (mieq_installed) {
        mieqSetHandler(ET_DGAEvent, NULL);
-    }
+       mieq_installed = 0;
+   }
 
    FreeMarkedVisuals(pScreen);
 
-- 
1.7.3.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to