summaryrefslogtreecommitdiff
path: root/composite
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@daimi.au.dk>2006-01-12 22:14:56 +0000
committerSøren Sandmann Pedersen <sandmann@daimi.au.dk>2006-01-12 22:14:56 +0000
commitc2dedf4d17f8a5b1a8037fd2b4e29122ef78945a (patch)
tree03adc3a1a20822e6a133432998c6bc8a484f6ba1 /composite
parent847d83ec3c90c5b298eaf19ba55251b4a30f4155 (diff)
Thu Jan 12 17:09:18 2006 Søren Sandmann <sandmann@redhat.com>
Add new functions to enable and disable events on Map and Unmap. Use them here to make sure Composite redirect doesn't cause Map/UnmapNotify events that would confuse window managers.
Diffstat (limited to 'composite')
-rw-r--r--composite/compalloc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/composite/compalloc.c b/composite/compalloc.c
index aabacbe7b..1deef685c 100644
--- a/composite/compalloc.c
+++ b/composite/compalloc.c
@@ -101,7 +101,11 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update)
return BadAlloc;
}
if (wasMapped)
+ {
+ DisableMapUnmapEvents (pWin);
UnmapWindow (pWin, FALSE);
+ EnableMapUnmapEvents (pWin);
+ }
REGION_NULL (pScreen, &cw->borderClip);
cw->update = CompositeRedirectAutomatic;
@@ -135,7 +139,9 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update)
{
Bool overrideRedirect = pWin->overrideRedirect;
pWin->overrideRedirect = TRUE;
+ DisableMapUnmapEvents (pWin);
MapWindow (pWin, pClient);
+ EnableMapUnmapEvents (pWin);
pWin->overrideRedirect = overrideRedirect;
}
@@ -169,7 +175,11 @@ compFreeClientWindow (WindowPtr pWin, XID id)
if (!cw->clients)
{
if (wasMapped)
+ {
+ DisableMapUnmapEvents (pWin);
UnmapWindow (pWin, FALSE);
+ EnableMapUnmapEvents (pWin);
+ }
if (pWin->redirectDraw)
compFreePixmap (pWin);
@@ -193,7 +203,9 @@ compFreeClientWindow (WindowPtr pWin, XID id)
{
Bool overrideRedirect = pWin->overrideRedirect;
pWin->overrideRedirect = TRUE;
+ DisableMapUnmapEvents (pWin);
MapWindow (pWin, clients[CLIENT_ID(id)]);
+ EnableMapUnmapEvents (pWin);
pWin->overrideRedirect = overrideRedirect;
}
}