[Differential] [Request, 76 lines] D2496: normalize output positions in setoperation

sebas (Sebastian Kügler) noreply at phabricator.kde.org
Fri Aug 19 03:45:23 UTC 2016


sebas created this revision.
sebas added a reviewer: Plasma.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  When setting a config, outputs may fall outside of the virtual screen
  layout. This can happen when, for example, a single screen is enabled
  and its position is not zero. The screen size is a unified rect of the
  enabled and connected outputs, which doesn't necessarily sit at 0,0
  initially. By normalizing the output position, we avoid this pitfall.
  
  Especially the xrandr backend struggles with this, since it will disable
  outputs falling outside of the virtual screen, and it does so after
  policy checks have happened, so in the worst (and actually fairly
  common) case, it will disable the only remaining output, leading to ...
  
  BUG:367490
  
  The reason to do the normalization in SetConfigOperation right before
  the config is passed to the backends to apply is to catch this
  inconsistency problem with configs at a common entry-point. Doing it in
  the library, rather than in the xrandr backend also means that we can
  autotest it -- we can't sensible do that with the xrandr backend.

TEST PLAN
  - manually tested by enabling the left / top most output of two actual outputs, this failed before and left all outputs disabled, with this patch, it works as expected
  - added autotest to make sure the normalization works

REPOSITORY
  rLIBKSCREEN KScreen Library

BRANCH
  sebas/positionnormalization

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

AFFECTED FILES
  autotests/testscreenconfig.cpp
  src/setconfigoperation.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: sebas, #plasma
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160819/be3ecd31/attachment.html>


More information about the Plasma-devel mailing list