Do not send VisibilityNotify events when MapUnmapEvents are disabled

This prevents a protocol visible side-effect (XVisibilityEvent) on
XCompositeRedirectWindow() followed by a XCompositeUnredirectWindow().

The problem shows up in gnome-screensaver with compiz and "unredirect
fullscreen windows" enable. A VisibilityNotify event is generated (first
with obscured and than with unobscured) when the window swithces from
redirected to unredirected.

https://bugs.freedesktop.org/show_bug.cgi?id=18133
http://launchpad.net/bugs/278112
This commit is contained in:
Michael Vogt 2008-11-25 19:35:17 +02:00 committed by Timo Aaltonen
parent 88297558aa
commit c8472a7444

View File

@ -3091,6 +3091,8 @@ void
SendVisibilityNotify(WindowPtr pWin)
{
xEvent event;
if (!MapUnmapEventsEnabled(pWin))
return;
#ifndef NO_XINERAMA_PORT
unsigned int visibility = pWin->visibility;
#endif