1. 03 Sep, 2020 1 commit
  2. 20 Aug, 2020 1 commit
  3. 19 Aug, 2020 1 commit
  4. 18 Aug, 2020 1 commit
  5. 11 Aug, 2020 1 commit
  6. 07 Aug, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Prettify license headers · 4ce853e8
      Vlad Zahorodnii authored
      4ce853e8
    • Vlad Zahorodnii's avatar
      Switch to SPDX license markers · 1fb9f6f1
      Vlad Zahorodnii authored
      The main advantage of SPDX license identifiers over the traditional
      license headers is that it's more difficult to overlook inappropriate
      licenses for kwin, for example GPL 3. We also don't have to copy a
      lot of boilerplate text.
      
      In order to create this change, I ran licensedigger -r -c from the
      toplevel source directory.
      1fb9f6f1
  7. 23 Jul, 2020 1 commit
  8. 30 Apr, 2020 1 commit
  9. 08 Apr, 2020 1 commit
    • David Edmundson's avatar
      [wayland] Add new XdgOutput properties · a13ecf8d
      David Edmundson authored
      Summary:
      AbstractOutput::name() behaviour is changed so that it matches the X11
      behaviour, showing an identifier like "HDMI-0".
      
      XdgOutput.name is set to this name.
      
      XdgOutput.description is currently set to the manufacturer name and
      model, but it's not exposed to Qt so we probably don't care too much.
      
      This should fix plasmashell changing applets when switching between X11
      and wayland.
      
      Test Plan:
      Relevant unit test
      I still need to run it on my laptop.
      
      Reviewers: #kwin, #plasma, zzag
      
      Reviewed By: #kwin, #plasma, zzag
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D28230
      a13ecf8d
  10. 23 Mar, 2020 1 commit
    • David Edmundson's avatar
      [wayland] Simplify output handling · 80d3f148
      David Edmundson authored
      Summary:
      Instead of changing lifespan of kwayland objects we can just call
      create() and delete() on it which affects the lifespan of the underlying
      resource, but not the kwayland wrapper.
      
      This gets rid of some duplicate syncing.
      
      Test Plan:
      Ran WAYLAND_DEBUG=1
      plugged in and removed a monitor
      output showed wl_output and xdg_output being handled correctly
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27899
      80d3f148
  11. 28 Feb, 2020 2 commits
  12. 27 Nov, 2019 1 commit
    • Roman Gilg's avatar
      Use Transform enum internally · e827d0a8
      Roman Gilg authored
      Summary:
      Instead of using Qt::ScreenOrientation use an enum class that is directly
      mapped to KWayland's transformation enums. This simplifies the code.
      
      Test Plan: Compiles and transformations work as before.
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11670
      
      Differential Revision: https://phabricator.kde.org/D25558
      e827d0a8
  13. 26 Nov, 2019 3 commits
    • Roman Gilg's avatar
      Set orientation from DRM on fallback · b7dbe0e8
      Roman Gilg authored
      Summary:
      In case of a failed atomic commit the previous mode should be fallen back to.
      For orientation provide again a setter that DRM backend can use to set the
      transform back to the last working one.
      
      Test Plan: Compiles, fallback works, cursor still messed up somewhat (scaling issue?).
      
      Reviewers: #kwin
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11670
      
      Differential Revision: https://phabricator.kde.org/D25507
      b7dbe0e8
    • Roman Gilg's avatar
      Associate output transforms and orientations · 6bfa931f
      Roman Gilg authored
      Summary:
      We use internally Qt:ScreenOrientation for representing output transforms.
      
      This is not ideal since the values do not map directly to Wayland transform
      values, but we can make it work by using OR combinations of
      Qt:ScreenOrientations.
      
      Do this for now and see if we should not better introduce an internal enum
      mapped directly.
      
      Additionally the OR combinations need to be handled in the drm backend at
      various places accordingly as well (see TODOs).
      
      Test Plan: Compiles
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11670
      
      Differential Revision: https://phabricator.kde.org/D25505
      6bfa931f
    • Roman Gilg's avatar
      Set transform in AbstractWaylandOutput · 523967b3
      Roman Gilg authored
      Summary:
      Move the Wayland output device and output transform calls from DRM backend
      to AbstractWaylandOutput. This leaves still some loose ends that need to be
      tied up later. On failed commit we want to fall back to last working state
      and orientation getter in general needs some more refactoring.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11670
      
      Differential Revision: https://phabricator.kde.org/D25504
      523967b3
  14. 05 Sep, 2019 3 commits
    • Roman Gilg's avatar
      [platforms/drm] Rework enablement and dpms switching · df3c1de8
      Roman Gilg authored
      Summary:
      This patch further refines output management.
      
      We go now through AbstractWaylandOutput virtual functions to enable and
      disable outputs.
      
      Dpms changes and enablement switches use separate code paths at start in the
      Drm backend code since they are similar but not the directly same. Common code
      is shared though, functions are renamed accordingly.
      
      Asserts have been put in place to better understand and check the control
      flow. A seemingly unnecessary call to DrmOutput::pageFlipped on reactivation
      after Vt switch has been removed to allow for that.
      
      In future patches we need to look additionally at the legacy mode switching
      code path which was and is still not working and better handling of the
      current monitor Dpms state. For example a monitor being switched off is not
      properly acted on and the workspace still expanded.
      
      Test Plan:
      With one and two monitors:
      * Dpms off/on
      * Vt switches
      * Screen disable/enable
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11459
      
      Differential Revision: https://phabricator.kde.org/D23600
      df3c1de8
    • Roman Gilg's avatar
      Replace Wayland/XDG outputs checks with enablement checks · b3e7664d
      Roman Gilg authored
      Summary:
      Make it more explicit what the relation is between Wayland and XDG objects
      existing and enablement:
      
      The ouput is enabled if and only if Wayland and XDG output objects exist.
      
      We can simplify the code by replacing checks on the outputs with checking
      the current enablement value.
      
      Test Plan: Wayland nested and virtual backends.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D23553
      b3e7664d
    • Roman Gilg's avatar
      Lift output enablement into Platform · f7ff62e2
      Roman Gilg authored
      Summary:
      This lifts the enablement code for outputs from the DRM backend to Platform
      allowing other Wayland backends in the future to use this interface as well.
      
      To do that we also create some helper functions on Platform level and have to
      spill some KWayland classes into AbstractOutput what motivates a further split
      of Platform into a Wayland child class like for AbstractOutput.
      
      Test Plan: Disabled and enabled an output in DRM session.
      
      Reviewers: #kwin
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D23545
      f7ff62e2
  15. 28 Aug, 2019 4 commits
    • Roman Gilg's avatar
      Assure wayland output interface creation path · f2c5f85c
      Roman Gilg authored
      Summary:
      The Wayland and XDG output interfaces are created or destroyed when the
      output is en- or disabled. This follows a clear path of dependencies and
      we should not check if this is indeed the case but instead assert on it.
      
      Test Plan: Nested Wayland and Drm sessions.
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D23540
      f2c5f85c
    • Roman Gilg's avatar
      Get output physical size from output device · 331f5d7d
      Roman Gilg authored
      Summary:
      Get the physical size directly from the always available output device
      interface instead of saving an additional copy in the abstract wayland
      output class.
      
      There is some ambiguity with orientation and naming that needs to be
      cleaned up when output orientation is reworked.
      
      Test Plan: Nested Wayland, Drm, virtual backends tested.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11459
      
      Differential Revision: https://phabricator.kde.org/D23496
      331f5d7d
    • Roman Gilg's avatar
      Get output pixel size from output device · dbb2cede
      Roman Gilg authored
      Summary:
      Get the pixel size directly from the always available output device
      interface instead of saving an additional copy in the backends.
      
      Test Plan: Nested Wayland, Drm, virtual backends tested.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11459
      
      Differential Revision: https://phabricator.kde.org/D23495
      dbb2cede
    • Roman Gilg's avatar
      Get output position and scale from output device interface · 819609a8
      Roman Gilg authored
      Summary:
      Let the data saved in OutputDeviceInterface be the single source of truth
      and as low hanging fruits first do this for global position and scale.
      
      Test Plan: Nested Wayland, Drm, virtual backends tested.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11459
      
      Differential Revision: https://phabricator.kde.org/D23489
      819609a8
  16. 29 Jul, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Use more traditional doxygen style · 684b4b63
      Vlad Zahorodnii authored
      Summary:
      So far we were following a bit unique and rare doxygen comment style:
      
          /**
           * Contents of the comment.
           **/
      
      Doxygen comments with this style look balanced and neat, but many people
      that contribute to KWin don't follow this style. Instead, they prefer
      more traditional doxygen comment style, i.e.
      
          /**
           * Contents of the comment.
           */
      
      Reviewing such changes has been a bit frustrating for me (so selfish!)
      and for other contributors.
      
      This change switches doxygen comment style in KWin to a more traditional
      style. The main reason for doing this is to make code review process easier
      for new contributors as well us.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D22812
      684b4b63
  17. 22 Jul, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Run clang-tidy with modernize-use-override check · 8af2fa73
      Vlad Zahorodnii authored
      Summary:
      Currently code base of kwin can be viewed as two pieces. One is very
      ancient, and the other one is more modern, which uses new C++ features.
      
      The main problem with the ancient code is that it was written before
      C++11 era. So, no override or final keywords, lambdas, etc.
      
      Quite recently, KDE compiler settings were changed to show a warning if
      a virtual method has missing override keyword. As you might have already
      guessed, this fired back at us because of that ancient code. We had
      about 500 new compiler warnings.
      
      A "solution" was proposed to that problem - disable -Wno-suggest-override
      and the other similar warning for clang. It's hard to call a solution
      because those warnings are disabled not only for the old code, but also
      for new. This is not what we want!
      
      The main argument for not actually fixing the problem was that git
      history will be screwed as well because of human factor. While good git
      history is a very important thing, we should not go crazy about it and
      block every change that somehow alters git history. git blame allows to
      specify starting revision for a reason.
      
      The other argument (human factor) can be easily solved by using tools
      such as clang-tidy. clang-tidy is a clang-based linter for C++. It can
      be used for various things, e.g. fixing coding style(e.g. add missing
      braces to if statements, readability-braces-around-statements check),
      or in our case add missing override keywords.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, apol, romangg, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D22371
      8af2fa73
  18. 13 Jun, 2019 1 commit
    • Roman Gilg's avatar
      [platforms/x11/standalone] Port to AbstractOutput · 1a11abc8
      Roman Gilg authored
      Summary:
      Represent outputs in the X11 session via AbstractOutput. For that we
      move all Wayland specific parts of AbstractOutput into a new subclass
      AbstractWaylandOutput and let the outputs of our Wayland backends inherit
      from there.
      
      This should allow us to get rid of the Screens class later on.
      
      Test Plan: Manually in X session.
      
      Reviewers: #kwin, zzag, davidedmundson
      
      Reviewed By: #kwin, zzag, davidedmundson
      
      Subscribers: ngraham, zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D19208
      1a11abc8
  19. 16 Apr, 2019 1 commit
  20. 12 Feb, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Overhaul doxygen comments · 7b20e1f6
      Vlad Zahorodnii authored
      Summary:
      We have a mix of different doxygen comment styles, e.g.
      
          /*!
            Foo bar.
           */
      
          /**
           * Foo bar.
           */
      
          /** Foo bar.
           */
      
          /**
           * Foo bar.
           */
      
          /**
           * Foo bar.
           **/
      
      To make the code more consistent, this change updates the style of all
      doxygen comments to the last one.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D18683
      7b20e1f6
  21. 14 Nov, 2018 7 commits
  22. 09 Nov, 2018 1 commit
    • Roman Gilg's avatar
      Initialize Wayland output in AbstractOutput · 21aee588
      Roman Gilg authored
      Summary:
      Wayland output is on protocol level and not dependent on the hardware
      platform. Next steps are to do the same for output device and then let
      the virtual output call into these initializing functions as well.
      
      Test Plan: Manually and auto test.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16783
      21aee588
  23. 31 Aug, 2018 2 commits
    • Roman Gilg's avatar
      [colorcorrection] Set gamma through Output class · 9cf2730f
      Roman Gilg authored
      Summary:
      With the new Output class we can set the gamma directly here. This is also
      a stepping stone to adjust individual output gamma adjustment later on.
      
      This means any future backend, which aims to support the color correction
      frontend needs to use the Output class.
      
      Test Plan: Night Color test still passes.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D11803
      9cf2730f
    • Roman Gilg's avatar
      Introduce generic Output class · fe63e21f
      Roman Gilg authored
      Summary:
      In order to separate high-level properties of individual outputs from
      hardware-specific ones and access these, introduce a new generic class Output.
      
      Also make the DrmOutput class directly a child class of this generic class.
      
      The long-term goal is to get rid of the Screens global object on Wayland and
      instead directly work with Output objects on compositing level.
      
      This should enable us long-term to do direct scanout to hardware planes, what
      I predict needs this generic output representation at one point.
      
      Test Plan: Manually.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D11781
      fe63e21f