summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2012-09-20 11:16:26 -0400
committerKeith Packard <keithp@keithp.com>2012-09-23 10:41:54 -0700
commitad0156c369a40762df6b70780358ce14e5f2c9b1 (patch)
tree0ee105422acd024a4ed4896068f238c943b28c3b
parent387b1ac33ca63d27e42d4f61cf248bafb7c43c17 (diff)
dix: Remove MapUnmapEventsEnabled and friends
This hack was added to suppress events generated by Composite's internal unmap/map cycle on redirection state change. Since that cycle was removed in 193ecc8b4, these can go. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Ville Syrjälä <syrjala@sci.fi> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--dix/window.c33
-rw-r--r--include/window.h3
2 files changed, 3 insertions, 33 deletions
diff --git a/dix/window.c b/dix/window.c
index 40f251634..e70531af6 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -2505,30 +2505,6 @@ RealizeTree(WindowPtr pWin)
}
}
-static WindowPtr windowDisableMapUnmapEvents;
-
-void
-DisableMapUnmapEvents(WindowPtr pWin)
-{
- assert(windowDisableMapUnmapEvents == NULL);
-
- windowDisableMapUnmapEvents = pWin;
-}
-
-void
-EnableMapUnmapEvents(WindowPtr pWin)
-{
- assert(windowDisableMapUnmapEvents != NULL);
-
- windowDisableMapUnmapEvents = NULL;
-}
-
-static Bool
-MapUnmapEventsEnabled(WindowPtr pWin)
-{
- return pWin != windowDisableMapUnmapEvents;
-}
-
static Bool
MaybeDeliverMapRequest(WindowPtr pWin, WindowPtr pParent, ClientPtr client)
{
@@ -2587,7 +2563,7 @@ MapWindow(WindowPtr pWin, ClientPtr client)
return Success;
pWin->mapped = TRUE;
- if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
+ if (SubStrSend(pWin, pParent))
DeliverMapNotify(pWin);
if (!pParent->realized)
@@ -2717,8 +2693,7 @@ UnrealizeTree(WindowPtr pWin, Bool fromConfigure)
}
#endif
(*Unrealize) (pChild);
- if (MapUnmapEventsEnabled(pWin))
- DeleteWindowFromAnyEvents(pChild, FALSE);
+ DeleteWindowFromAnyEvents(pChild, FALSE);
if (pChild->viewable) {
pChild->viewable = FALSE;
(*MarkUnrealizedWindow) (pChild, pWin, fromConfigure);
@@ -2766,7 +2741,7 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
if ((!pWin->mapped) || (!(pParent = pWin->parent)))
return Success;
- if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
+ if (SubStrSend(pWin, pParent))
DeliverUnmapNotify(pWin, fromConfigure);
if (wasViewable && !fromConfigure) {
pWin->valdata = UnmapValData;
@@ -2946,8 +2921,6 @@ SendVisibilityNotify(WindowPtr pWin)
xEvent event;
unsigned int visibility = pWin->visibility;
- if (!MapUnmapEventsEnabled(pWin))
- return;
#ifdef PANORAMIX
/* This is not quite correct yet, but it's close */
if (!noPanoramiXExtension) {
diff --git a/include/window.h b/include/window.h
index f8fc2a5fe..b6d61c339 100644
--- a/include/window.h
+++ b/include/window.h
@@ -221,9 +221,6 @@ extern _X_EXPORT RegionPtr CreateBoundingShape(WindowPtr /* pWin */ );
extern _X_EXPORT RegionPtr CreateClipShape(WindowPtr /* pWin */ );
-extern _X_EXPORT void DisableMapUnmapEvents(WindowPtr /* pWin */ );
-extern _X_EXPORT void EnableMapUnmapEvents(WindowPtr /* pWin */ );
-
extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
extern _X_EXPORT void PrintWindowTree(void);