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>
This commit is contained in:
parent
387b1ac33c
commit
ad0156c369
33
dix/window.c
33
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
|
static Bool
|
||||||
MaybeDeliverMapRequest(WindowPtr pWin, WindowPtr pParent, ClientPtr client)
|
MaybeDeliverMapRequest(WindowPtr pWin, WindowPtr pParent, ClientPtr client)
|
||||||
{
|
{
|
||||||
|
@ -2587,7 +2563,7 @@ MapWindow(WindowPtr pWin, ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
|
|
||||||
pWin->mapped = TRUE;
|
pWin->mapped = TRUE;
|
||||||
if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
|
if (SubStrSend(pWin, pParent))
|
||||||
DeliverMapNotify(pWin);
|
DeliverMapNotify(pWin);
|
||||||
|
|
||||||
if (!pParent->realized)
|
if (!pParent->realized)
|
||||||
|
@ -2717,8 +2693,7 @@ UnrealizeTree(WindowPtr pWin, Bool fromConfigure)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
(*Unrealize) (pChild);
|
(*Unrealize) (pChild);
|
||||||
if (MapUnmapEventsEnabled(pWin))
|
DeleteWindowFromAnyEvents(pChild, FALSE);
|
||||||
DeleteWindowFromAnyEvents(pChild, FALSE);
|
|
||||||
if (pChild->viewable) {
|
if (pChild->viewable) {
|
||||||
pChild->viewable = FALSE;
|
pChild->viewable = FALSE;
|
||||||
(*MarkUnrealizedWindow) (pChild, pWin, fromConfigure);
|
(*MarkUnrealizedWindow) (pChild, pWin, fromConfigure);
|
||||||
|
@ -2766,7 +2741,7 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
|
||||||
|
|
||||||
if ((!pWin->mapped) || (!(pParent = pWin->parent)))
|
if ((!pWin->mapped) || (!(pParent = pWin->parent)))
|
||||||
return Success;
|
return Success;
|
||||||
if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
|
if (SubStrSend(pWin, pParent))
|
||||||
DeliverUnmapNotify(pWin, fromConfigure);
|
DeliverUnmapNotify(pWin, fromConfigure);
|
||||||
if (wasViewable && !fromConfigure) {
|
if (wasViewable && !fromConfigure) {
|
||||||
pWin->valdata = UnmapValData;
|
pWin->valdata = UnmapValData;
|
||||||
|
@ -2946,8 +2921,6 @@ SendVisibilityNotify(WindowPtr pWin)
|
||||||
xEvent event;
|
xEvent event;
|
||||||
unsigned int visibility = pWin->visibility;
|
unsigned int visibility = pWin->visibility;
|
||||||
|
|
||||||
if (!MapUnmapEventsEnabled(pWin))
|
|
||||||
return;
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
/* This is not quite correct yet, but it's close */
|
/* This is not quite correct yet, but it's close */
|
||||||
if (!noPanoramiXExtension) {
|
if (!noPanoramiXExtension) {
|
||||||
|
|
|
@ -221,9 +221,6 @@ extern _X_EXPORT RegionPtr CreateBoundingShape(WindowPtr /* pWin */ );
|
||||||
|
|
||||||
extern _X_EXPORT RegionPtr CreateClipShape(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 SetRootClip(ScreenPtr pScreen, Bool enable);
|
||||||
extern _X_EXPORT void PrintWindowTree(void);
|
extern _X_EXPORT void PrintWindowTree(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue