D8345: [QPA] Implement Screen on top of internal Screens API

Martin Flöser noreply at phabricator.kde.org
Tue Oct 17 17:20:50 UTC 2017


graesslin created this revision.
graesslin added reviewers: KWin, Plasma.
Restricted Application added a project: KWin.
Restricted Application added subscribers: kwin, plasma-devel.

REVISION 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

REPOSITORY
  R108 KWin

BRANCH
  qpa-screens

REVISION DETAIL
  https://phabricator.kde.org/D8345

AFFECTED FILES
  autotests/integration/CMakeLists.txt
  plugins/qpa/integration.cpp
  plugins/qpa/integration.h
  plugins/qpa/screen.cpp
  plugins/qpa/screen.h

To: graesslin, #kwin, #plasma
Cc: plasma-devel, kwin, bwowk, ZrenBot, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20171017/a53b26b2/attachment.html>


More information about the Plasma-devel mailing list