[WindowThumbnail] Discard pixmap on map events.

According to [X.org
docs](http://www.x.org/releases/X11R7.7/doc/compositeproto/compositeproto.txt)
regarding NameWindowPixmap:

"This pixmap will remain allocated until freed, even if 'window' is
unmapped, reconfigured or destroyed. However, 'window' will get a new
pixmap allocated each time it is mapped or resized, so this request will
need to be reinvoked"

So, pixmap needs to be discarded not only on XCB_CONFIGURE_NOTIFY event
but on XCB_MAP_NOTIFY event also.
This commit is contained in:
Mihail Ivchenko 2016-09-22 21:29:11 +01:00 committed by David Edmundson
parent 494c690b18
commit edf0d68ea5

View File

@ -339,6 +339,12 @@ bool WindowThumbnail::nativeEventFilter(const QByteArray &eventType, void *messa
m_damaged = true;
update();
}
} else if (responseType == XCB_MAP_NOTIFY) {
if (reinterpret_cast<xcb_configure_notify_event_t *>(event)->window == m_winId) {
releaseResources();
m_damaged = true;
update();
}
}
#else
Q_UNUSED(message)