1. 12 Oct, 2020 1 commit
  2. 18 Sep, 2020 1 commit
  3. 15 Sep, 2020 1 commit
  4. 26 Aug, 2020 1 commit
  5. 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
  6. 02 Aug, 2020 1 commit
  7. 30 Apr, 2020 1 commit
  8. 20 Apr, 2020 1 commit
    • Méven Car's avatar
      Wayland: Allow to take single screen screenshots using scale factor without loss · 66898e7f
      Méven Car authored
      Summary:
      The screenshot made on screens with scale factor were downscaled by their scale factor making them blurry.
      It prevents taking screenshots of missing Hidpi related bugs showing the issues under Wayland.
      
      This fix the case of a single screenshot, but not the rest:
      Multiscreen screenshot downscales the screen using scale factor.
      Spectacle rectangular selection screenshot is broken as soon as some scale factor different than 1 is used on any screen.
      
      Test Plan:
      Under Wayland with a scale factor on a screen, take a screenshot using spectacle.
      The output image is not downscaled and has the same size as the screen resolution.
      
      No other change to any other screenshot mode, or under X.
      
      Reviewers: davidedmundson, #kwin
      
      Reviewed By: davidedmundson, #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D29010
      66898e7f
  9. 27 Mar, 2020 1 commit
  10. 04 Mar, 2020 1 commit
  11. 22 Feb, 2020 4 commits
    • Nicolas Fella's avatar
      Revert "[kcm/effects] Clip ListView" · 7159684c
      Nicolas Fella authored
      Bad merge
      
      This reverts commit b7130442.
      7159684c
    • Nicolas Fella's avatar
      [kcm/effects] Clip ListView · b7130442
      Nicolas Fella authored
      Summary:
      Otherwise the content overflows the frame when scrolling.
      
      QQC2 scrollview docs say "ScrollView does not automatically clip its contents. If it is not used as a full-screen item, you should consider setting the clip property to true"
      
      Test Plan:
      Before:
      {F8121150}
      
      After:
      {F8121152}
      
      Reviewers: #kwin, #plasma, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: ngraham, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27558
      b7130442
    • Nicolas Fella's avatar
      Revert "[kcm/effects] Clip ListView" · cdc5ea19
      Nicolas Fella authored
      Bad merge
      
      This reverts commit 5babf52d.
      cdc5ea19
    • Nicolas Fella's avatar
      [kcm/effects] Clip ListView · 5babf52d
      Nicolas Fella authored
      Summary:
      Otherwise the content overflows the frame when scrolling.
      
      QQC2 scrollview docs say "ScrollView does not automatically clip its contents. If it is not used as a full-screen item, you should consider setting the clip property to true"
      
      Test Plan:
      Before:
      {F8121150}
      
      After:
      {F8121152}
      
      Reviewers: #kwin, #plasma, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: ngraham, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27558
      5babf52d
  12. 12 Feb, 2020 1 commit
  13. 14 Jan, 2020 1 commit
  14. 27 Nov, 2019 1 commit
  15. 01 Nov, 2019 1 commit
    • David Edmundson's avatar
      [effects] Add effect to hold the desktop window static after plasmashell quits · e4ac215f
      David Edmundson authored
      Summary:
      When a plasma session quits, the order of plasmashell and clients quitting is undetermined.
      
      This looks bad as our desktop background disappears quite early. Rather than changing the real order, we can have kwin reference the last pixmap of any desktop and hold on to it.
      
      Lasting till the compositor quits means it stays on the X frontbuffer till X quits and the experience is seamless.
      
      Test Plan: Logged out (with relevant other ksmserver patches)
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24864
      e4ac215f
  16. 30 Oct, 2019 1 commit
    • Albert Astals Cid's avatar
      Add some const & · e144748c
      Albert Astals Cid authored
      Summary:
      Won't make things go much faster since everything that was
      being passed by value is refcounted but still const & is a bit faster
      than refcounting
      
      For shared pointers instead of adding const & we move them into the
      destination variable saving some cpu usage but at the same time making
      clear the pointer is being stored by not being const &
      
      Reviewers: zzag
      
      Reviewed By: zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25022
      e144748c
  17. 29 Sep, 2019 1 commit
  18. 27 Sep, 2019 1 commit
    • David Edmundson's avatar
      [libkwineffects] Introduce API to easily show a QtQuick scene in an effect · 40b0296d
      David Edmundson authored
      Summary:
      EffectQuickView/Scene is a convenient class to render a QtQuick
      scenegraph into an effect.
      
      Current methods (such as present windows) involve creating an underlying
      platform window which is expensive, causes a headache to filter out
      again in the rest of the code, and only works as an overlay.
      
      The new class exposes things more natively to an effect where we don't
      mess with real windows, we can perform the painting anywhere in the view
      and we don't have issues with hiding/closing.
      
      QtQuick has both software and hardware accelerated modes, and kwin also
      has 3 render backends. Every combination is supported.
      
      * When used in OpenGL mode for both, we render into an FBO export the
      texture ID then it's up to the effect to render that into a scene.
      
      * When using software QtQuick rendering we blit into an image, upload
      that into a KWinGLTexture which serves as an abstraction layer and
      render that into the scene.
      
      * When using GL for QtQuick and XRender/QPainter in kwin everything is
      rendered into the internal FBO, blit and exported as an image.
      
      * When using software rendering for both an image gets passed directly.
      
      Mouse and keyboard events can be forwarded, only if the effect
      intercepts them.
      
      The class is meant to be generic enough that we can remove all the
      QtQuick code from Aurorae.
      
      The intention is also to replace EffectFrameImpl using this backend and
      we can kill all of the EffectFrame code throughout the scenes.
      
      The close button in present windows will also be ported to this,
      simplifiying that code base.
      
      Classes that handle the rendering and handling QML are intentionally
      split so that in the future we can have a declarative effects API create
      overlays from within the same context. Similar to how one can
      instantiate windows from a typical QML scene.
      
      Notes:
      I don't like how I pass the kwin GL context from the backends into the
      effect, but I need something that works with the library separation. It
      also currently has wayland problem if I create a QOpenGLContext before
      the QPA is set up with a scene - but I don't have anything better?
      
      I know for the EffectFrame we need an API to push things through the
      effects stack to handle blur/invert etc. Will deal with that when we
      port the EffectFrame.
      
      Test Plan: Used in an effect
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24215
      40b0296d
  19. 26 Sep, 2019 1 commit
  20. 14 Sep, 2019 1 commit
  21. 06 Sep, 2019 1 commit
  22. 31 Aug, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Switch to Q_ASSERT · 7a3722b4
      Vlad Zahorodnii authored
      Summary:
      Switch to Q_ASSERT in order to make code a bit more consistent. We have
      places where both assert and Q_ASSERT are used next to each other. Also,
      distributions like Ubuntu don't strip away assert(), let's hope that
      things are a bit different with Q_ASSERT.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: romangg, davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D23605
      7a3722b4
  23. 11 Aug, 2019 1 commit
  24. 09 Aug, 2019 1 commit
  25. 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
  26. 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
  27. 09 Jul, 2019 1 commit
  28. 23 Jun, 2019 1 commit
    • David Edmundson's avatar
      Close screen grabbing effect when screensaver starts · 3604aaf7
      David Edmundson authored
      Summary:
      The screenlock fails on X11 if it can't grab the keyboard.
      
      We can't nicely solve the generic case. We can solve the common case of
      a kwin effect being active.
      
      It's not critical, arguably not even desirable to have these effects
      persist after the screen is locked through an external trigger. We can
      just close the effect early.
      
      Key grabs have to be relased early before the close animation completes
      so that the locker doesn't have a race based on animation times.
      
      It's not ideal, but no worse than the current state for not much work.
      
      BUG: 234153
      
      Test Plan:
      locked screen on a timer
      opened various effects
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: ngraham, zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D20890
      3604aaf7
  29. 02 May, 2019 1 commit
  30. 23 Apr, 2019 1 commit
  31. 18 Apr, 2019 1 commit
  32. 09 Apr, 2019 1 commit
  33. 25 Mar, 2019 1 commit
  34. 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
  35. 27 Jan, 2019 2 commits
    • Martin Flöser's avatar
      Switch ThumbnailItem to internal uuid instead of WId · 932ccb2a
      Martin Flöser authored
      Summary:
      So far the ThumbnailItem in TabBox mode used the window id for finding
      the window it should render a thumbnail on. In the Wayland world this is
      not unique. The window id could be either an X11 window or a wayland
      window. We don't guarantee that there are no conflicting ids.
      
      With the internal id we have a way to properly identify the windows, so
      this element should use them.
      
      To support this the property changed the type to QUuid and the
      clientmodel also provides the QUuid. As in TabBox the way to get the
      window is through the model this should be compatible for all themes.
      It's tested and verified with the Breeze switcher.
      
      For declarative KWin scripts the ThumbnailItem also provides the
      AbstractClient as a property, so there should not be any script which
      uses wid. If it does, this could break, but well the script should use
      the intended API.
      
      Test Plan: ctest passes, manual testing of Breeze alt-tab switcher
      
      Reviewers: #kwin
      
      Differential Revision: https://phabricator.kde.org/D18405
      932ccb2a
    • Martin Flöser's avatar
      Add windowsystem plugin for KWin's qpa · 02a05610
      Martin Flöser authored
      Summary:
      KWindowSystem provides a plugin interface to have platform specific
      implementations. So far KWin relied on the implementation in
      KWayland-integration repository.
      
      This is something I find unsuited, for the following reasons:
       * any test in KWin for functionality set through the plugin would fail
       * it's not clear what's going on where
       * in worst case some code could deadlock
       * KWin shouldn't use KWindowSystem and only a small subset is allowed
      to be used
      
      The last point needs some further explanation. KWin internally does not
      and cannot use KWindowSystem. KWindowSystem (especially KWindowInfo) is
      exposing information which KWin sets. It's more than weird if KWin asks
      KWindowSystem for the state of a window it set itself. On X11 it's just
      slow, on Wayland it can result in roundtrips to KWin itself which is
      dangerous.
      
      But due to using Plasma components we have a few areas where we use
      KWindowSystem. E.g. a Plasma::Dialog sets a window type, the slide in
      direction, blur and background contrast. This we want to support and
      need to support. Other API elements we do not want, like for examples
      the available windows. KWin internal windows either have direct access
      to KWin or a scripting interface exposed providing (limited) access -
      there is just no need to have this in KWindowSystem.
      
      To make it more clear what KWin supports as API of KWindowSystem for
      internal windows this change implements a stripped down version of the
      kwayland-integration plugin. The main difference is that it does not use
      KWayland at all, but a QWindow internal side channel.
      
      To support this EffectWindow provides an accessor for internalWindow and
      the three already mentioned effects are adjusted to read from the
      internal QWindow and it's dynamic properties.
      
      This change is a first step for a further refactoring. I plan to split
      the internal window out of ShellClient into a dedicated class. I think
      there are nowadays too many special cases. If it moves out there is the
      question whether we really want to use Wayland for the internal windows
      or whether this is just historic ballast (after all we used to use
      qwayland for that in the beginning).
      
      As the change could introduce regressions I'm targetting 5.16.
      
      Test Plan:
      new test case for window type, manual testing using Alt+Tab
      for the effects integration. Sliding popups, blur and contrast worked fine.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D18228
      02a05610