summaryrefslogtreecommitdiff
path: root/hw/xfree86/common
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2018-08-27 16:39:10 -0400
committerAdam Jackson <ajax@nwnk.net>2018-09-12 19:18:05 +0000
commit3d06d111b272d495c2f12779097a3d9f1e632603 (patch)
tree6d98392ec9b087ff781c6bf86eb171af7fc9920b /hw/xfree86/common
parent801977e8252f87f9ab156c7e02ad00fb1d70f8e5 (diff)
dga: Simplify mieq handler registration
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw/xfree86/common')
-rw-r--r--hw/xfree86/common/xf86DGA.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 505b01917..de805c4c0 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -81,7 +81,6 @@
static DevPrivateKeyRec DGAScreenKeyRec;
#define DGAScreenKeyRegistered dixPrivateKeyRegistered(&DGAScreenKeyRec)
-static Bool mieq_installed;
static Bool DGACloseScreen(ScreenPtr pScreen);
static void DGADestroyColormap(ColormapPtr pmap);
@@ -268,10 +267,7 @@ DGACloseScreen(ScreenPtr pScreen)
{
DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
- if (mieq_installed) {
- mieqSetHandler(ET_DGAEvent, NULL);
- mieq_installed = FALSE;
- }
+ mieqSetHandler(ET_DGAEvent, NULL);
FreeMarkedVisuals(pScreen);
@@ -461,10 +457,7 @@ xf86SetDGAMode(ScrnInfoPtr pScrn, int num, DGADevicePtr devRet)
pScreenPriv->grabMouse = TRUE;
pScreenPriv->grabKeyboard = TRUE;
- if (!mieq_installed) {
- mieqSetHandler(ET_DGAEvent, DGAHandleEvent);
- mieq_installed = TRUE;
- }
+ mieqSetHandler(ET_DGAEvent, DGAHandleEvent);
return Success;
}
@@ -481,10 +474,7 @@ DGASetInputMode(int index, Bool keyboard, Bool mouse)
pScreenPriv->grabMouse = mouse;
pScreenPriv->grabKeyboard = keyboard;
- if (!mieq_installed) {
- mieqSetHandler(ET_DGAEvent, DGAHandleEvent);
- mieq_installed = TRUE;
- }
+ mieqSetHandler(ET_DGAEvent, DGAHandleEvent);
}
}