kwin/plugins/qpa
Martin Flöser abedb464d5 [QPA] Implement Screen on top of internal Screens API
Summary:
The test DontCrashUseractionsMenu (Waylandonly) found an issue in our
screen handling implementation in the QPA. The code exposed a short time
frame between the dummy screen getting destroyed and the first screen
being added. This could result in a crash of KWin.

There is actually no need to implement Screen on top of Wayland screen.
KWin has all the knowledge, so we can also base this on top of the
Screens API.

Advantages:
 * no delays due to Wayland roundtrips
 * handle screen getting removed (was a TODO)
 * handle resolution changes (was a TODO)

The new implementation has a disadvantage that it destroys and readds
all screens whenever something around the screen changes. This shouldn't
be an issue in practice as it's only for the internal QPA and thus only
affects KWin internal windows which is placed in global coordinates
anyway. If it turns out to be a problem we need to track better the
screen changes - so far those were not tracked at all.

Test Plan: Run a few unit tests which change screens

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8345
2017-10-19 18:03:10 +02:00
..
abstractplatformcontext.cpp [plugins/qpa] Drop unused variable AbstractPlatformContext::m_integration 2017-07-31 18:09:15 +02:00
abstractplatformcontext.h [plugins/qpa] Drop unused variable AbstractPlatformContext::m_integration 2017-07-31 18:09:15 +02:00
backingstore.cpp [qpa] Prevent crash due to Surface getting null 2017-07-06 19:14:15 +02:00
backingstore.h
CMakeLists.txt [plugins/qpa] support use of modularized qtplatformsupport from Qt 5.8 2016-10-28 21:12:48 +09:00
integration.cpp [QPA] Implement Screen on top of internal Screens API 2017-10-19 18:03:10 +02:00
integration.h [QPA] Implement Screen on top of internal Screens API 2017-10-19 18:03:10 +02:00
kwin.json
main.cpp [qpa] Fix overloaded-virtual warning 2017-07-30 08:22:32 +02:00
nativeinterface.cpp [qpa] Prevent crash due to Surface getting null 2017-07-06 19:14:15 +02:00
nativeinterface.h [plugins/qpa] Add a roundtrip platform function 2016-03-16 11:10:14 +01:00
platformcontextwayland.cpp [plugins/qpa] Call makeCurrent on the QOpenGLContext instead of the one in the platform context 2016-08-26 07:38:04 +02:00
platformcontextwayland.h
platformcursor.cpp [plugins/qpa] Implement a custom QPlatformCursor 2016-02-17 12:42:12 +01:00
platformcursor.h [plugins/qpa] Implement a custom QPlatformCursor 2016-02-17 12:42:12 +01:00
screen.cpp [QPA] Implement Screen on top of internal Screens API 2017-10-19 18:03:10 +02:00
screen.h [QPA] Implement Screen on top of internal Screens API 2017-10-19 18:03:10 +02:00
sharingplatformcontext.cpp [plugins/qpa] Drop unused variable AbstractPlatformContext::m_integration 2017-07-31 18:09:15 +02:00
sharingplatformcontext.h [plugins/qpa] Drop unused variable AbstractPlatformContext::m_integration 2017-07-31 18:09:15 +02:00
window.cpp [plugins/qpa] Properly ifdef everything with HAVE_WAYLAND_EGL 2017-07-31 18:04:53 +02:00
window.h [plugins/qpa] Properly ifdef everything with HAVE_WAYLAND_EGL 2017-07-31 18:04:53 +02:00