On Wayland never try to create a WindowPixmap from an X11 pixmap

Summary:
Our Wayland compositors cannot composite an X11 pixmap. Thus even
if we succeed in creating the pixmap, the changes would not get to
the scene. The code allowed for situation where a surface is not yet
set to fall back to the X11 code path. This can happen for XWayland
windows.

Test Plan: Crash in xclipboardsynctest without the change

Reviewers: #plasma_on_wayland, #kwin

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2010
icc-effect-5.14.5
Martin Gräßlin 2016-06-26 16:27:15 +02:00
parent 758d41d6bf
commit f79c3f244d
1 changed files with 2 additions and 1 deletions

View File

@ -964,7 +964,8 @@ void WindowPixmap::create()
if (isValid() || toplevel()->isDeleted()) {
return;
}
if (toplevel()->surface()) {
// always update from Buffer on Wayland, don't try using XPixmap
if (kwinApp()->shouldUseWaylandForCompositing()) {
// use Buffer
updateBuffer();
if ((m_buffer || !m_fbo.isNull()) && m_subSurface.isNull()) {