[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kwin/Plasma/5.7] /: On Wayland never try to create a WindowPixmap from an X11 pixmap
From:       Martin_Gräßlin <mgraesslin () kde ! org>
Date:       2016-06-29 7:02:11
Message-ID: E1bI9Vj-00029n-4M () code ! kde ! org
[Download RAW message or body]

Git commit f79c3f244d5728c4243a8315f6ca33d2b5a1c72c by Martin Gr=C3=A4=C3=
=9Flin.
Committed on 29/06/2016 at 07:01.
Pushed by graesslin into branch 'Plasma/5.7'.

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

M  +2    -1    scene.cpp

http://commits.kde.org/kwin/f79c3f244d5728c4243a8315f6ca33d2b5a1c72c

diff --git a/scene.cpp b/scene.cpp
index 7d9f3d2..834a731 100644
--- a/scene.cpp
+++ b/scene.cpp
@@ -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()) {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic