xfree86/dga: Remove the ET_DGAEvent handler only if it was installed

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@sci.fi>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Ville Syrjala 2011-01-24 01:06:42 +02:00 committed by Peter Hutterer
parent e1547a9f1f
commit f4cb25c2ed

View File

@ -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);