[PATCH 04/11] xfree86/dga: Remove the ET_DGAEvent handler only if it was installed

Ville Syrjala syrjala at sci.fi
Sun Jan 23 15:06:42 PST 2011


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 <syrjala at sci.fi>
---
 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



More information about the xorg-devel mailing list