1. 02 Apr, 2020 2 commits
    • Aleix Pol Gonzalez's avatar
      Make it possible to have a separate cursor for the tablet · 6abd23ed
      Aleix Pol Gonzalez authored
      Summary:
      As is KWin only had 1 Cursor which was a singleton. This made it impossible for
      us to properly implement the tablet (as in drawing tablets) support and show where
      we're drawing.
      This patch makes it possible to have different Cursors in KWin, it makes all the
      current code still follow the mouse but the tablet can still render a cursor.
      
      Test Plan: Tests pass, been using it and works as well as before but with beautiful tablet cursors.
      
      Reviewers: #kwin, cblack, davidedmundson
      
      Reviewed By: #kwin, cblack, davidedmundson
      
      Subscribers: davidedmundson, cblack, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D28155
      6abd23ed
    • Aleix Pol Gonzalez's avatar
      Fix for older cmake versions · da2d8962
      Aleix Pol Gonzalez authored
      Summary: Recent changes prevented it to build on KDE Neon.
      
      Test Plan: Built it on Neon
      
      Reviewers: #kwin, bshah, davidedmundson
      
      Reviewed By: #kwin, bshah, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D28511
      da2d8962
  2. 01 Apr, 2020 1 commit
    • Aleix Pol Gonzalez's avatar
      Reduce the amount of objects that are compiled several times · dbac4bce
      Aleix Pol Gonzalez authored
      Summary:
      We build some objects several times which makes it uncomfortable to develop KWin
      since every time we modify something a lot of things get rebuilt. This should
      help a bit although it doesn't solve all the problems.
      
      Test Plan: Builds, tests pass
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: davidedmundson, zzag, anthonyfieroni, iasensio, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D28445
      dbac4bce
  3. 26 Mar, 2020 1 commit
  4. 20 Mar, 2020 1 commit
  5. 18 Mar, 2020 1 commit
  6. 17 Mar, 2020 1 commit
  7. 14 Mar, 2020 1 commit
  8. 04 Mar, 2020 2 commits
  9. 02 Mar, 2020 1 commit
    • Vlad Zahorodnii's avatar
      [autotests] Fix failing KeyboardLayoutTest::testNumLock() · 5d580b9f
      Vlad Zahorodnii authored
      Summary:
      Since Qt::KeypadModifier is set only for keypad keys and not the NumLock
      key, we need to press at least one keypad key to determine whether
      numlock is actually on. On the other hand, we know that when numlock is
      on, the corresponding LED is also on. So we could check the LED rather
      than press two keys.
      
      Test Plan: testKeyboardLayout passes.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27789
      5d580b9f
  10. 29 Feb, 2020 1 commit
    • Roman Gilg's avatar
      Remove orientation sensor · 2c66e1f6
      Roman Gilg authored
      Summary:
      This functionality will instead be implemented in KScreen such that manual and
      automatic output rotation can be used and configured through a single UI in
      unison together.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin, davidedmundson, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: kwin, bshah, davidedmundson, zzag
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26036
      2c66e1f6
  11. 28 Feb, 2020 3 commits
    • Vlad Zahorodnii's avatar
      [autotests] Fix PointerInputTest::testCursorImage() · fcea0eb2
      Vlad Zahorodnii authored
      Summary:
          FAIL!  : KWin::PointerInputTest::testCursorImage() Compared QImages differ in device pixel ratio.
             Actual   (((p->cursorImage()))): 2
             Expected (blueScaled): 1
             Loc: [/home/vlad/Workspace/KDE/src/kde/workspace/kwin/autotests/integration/pointer_input.cpp(1058)]
      
      Test Plan: The test passes.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27725
      fcea0eb2
    • Vlad Zahorodnii's avatar
      Refactor geometry constraints code · a75fb7f8
      Vlad Zahorodnii authored
      Summary:
      Currently, there are a couple of issues with sizeForClientSize(). First
      of all, we have a method called clientSizeToFrameSize() which does similar
      thing except applying geometry constraints and checking window rules. The
      other issue is that sizeForClientSize() is doing a bit too much, it checks
      window rules, it applies a bunch of geometry constrains. Sometimes it
      does not perform conversion between client sizes and frame sizes!
      
      This change attempts to address those issues by replacing sizeForClientSize
      with two similar methods and changing semantics of some methods of the
      X11Client class.
      
      The most significant difference between sizeForClientSize() and the new
      methods is that neither constrainClientSize() nor constrainFrameSize()
      check window rules. This is up to users of those methods. In many places,
      we don't have to check window rules because we check isResizable(),
      which returns false if the frame size is enforced by a window rule.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, romangg, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26828
      a75fb7f8
    • Vlad Zahorodnii's avatar
      [autotests] Add tests for PMinSize, PMaxSize, and PResizeInc geometry hints · e32374ab
      Vlad Zahorodnii authored
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27400
      e32374ab
  12. 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
  13. 14 Feb, 2020 1 commit
  14. 13 Feb, 2020 1 commit
  15. 12 Feb, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Introduce Toplevel::frameGeometryChanged signal · 15af09c7
      Vlad Zahorodnii authored
      Summary:
      Currently we have two signals that are emitted when the Toplevel's geometry
      changes - geometryShapeChanged() and geometryChanged(). The former signal
      is used primarily to invalidate cached window quads and the latter is
      sort of emitted when the frame geometry changes. But it's not that easy. We
      have a bunch of connects that link those signals together...
      
      The worst part about all of this is that the window quads cache gets
      invalidated every time a geometry update occurs, for example when user
      moves a window around on the screen.
      
      This change introduces a new signal and deprecates the existing geometryChanged
      signal. frameGeometryChanged is similar to geometryChanged except that it is
      emitted when an _actual_ geometry change has occurred.
      
      We do still emit geometryShapeChanged signal. However, in long term, we
      need to get rid of this signal or come up with something that makes sense
      and doesn't require us to waste computational resources.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, romangg, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26863
      15af09c7
  16. 05 Feb, 2020 1 commit
  17. 03 Feb, 2020 1 commit
  18. 31 Jan, 2020 1 commit
  19. 25 Jan, 2020 1 commit
  20. 23 Jan, 2020 1 commit
    • Vlad Zahorodnii's avatar
      [wayland] Keep the opposite corner still when resizing a window · d079f5da
      Vlad Zahorodnii authored
      Summary:
      According to the xdg-shell spec, configure events carry the maximum
      window geometry size. If a client wants to enforce aspect ratio, it
      may attach a buffer with smaller size. We need to account for that
      when determining frame geometry in the commit handler.
      
      I'm targeting 5.18 branch.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26886
      d079f5da
  21. 14 Jan, 2020 1 commit
  22. 10 Dec, 2019 1 commit
  23. 02 Dec, 2019 1 commit
  24. 27 Nov, 2019 3 commits
    • Vlad Zahorodnii's avatar
      Drop some custom list typedefs · 9d4a3259
      Vlad Zahorodnii authored
      Summary:
      Qt has its own thing where a type might also have corresponding list
      alias, e.g. QObject and QObjectList, QWidget and QWidgetList. I don't
      know why Qt does that, maybe for some historical reasons, but what
      matters is that we copy this pattern here in KWin. While this pattern
      might be useful with some long list types, for example
      
          QList<QWeakPointer<TabBoxClient>> TabBoxClientList
      
      in general, it causes more harm than good. For example, we've got two
      new client types, do we need corresponding list typedefs for them? If
      no, why do we have ClientList and so on?
      
      Another problem with these typedefs is that you need to include utils.h
      header in order to use them. A better way to handle such things is to
      just forward declare a client class (if that's possible) and use it
      directly with QList or QVector. This way translation units don't get
      "bloated" with utils.h stuff for no apparent reason.
      
      So, in order to make code more consistent and easier to follow, this
      change drops some of our custom typedefs. Namely ConstClientList,
      ClientList, DeletedList, UnmanagedList, ToplevelList, and GroupList.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24950
      9d4a3259
    • Vlad Zahorodnii's avatar
      [libkwineffects] Expose frame and buffer geometry to effects · 28b3b8f0
      Vlad Zahorodnii authored
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T10867
      
      Differential Revision: https://phabricator.kde.org/D24459
      28b3b8f0
    • Vlad Zahorodnii's avatar
      [wayland] Implement window geometry more properly · 9f7a856d
      Vlad Zahorodnii authored
      Summary:
      So far the window geometry from xdg-shell wasn't implemented as it should
      be. A toplevel must have two geometries assigned to it - frame and buffer.
      The frame geometry describes bounds of the client excluding server-side
      and client-side drop-shadows. The buffer geometry specifies rectangle on
      the screen occupied by the main surface.
      
      State and geometry handling in XdgShellClient is still a bit broken. This
      change doesn't intend to fix that, it must be done in another patch asap.
      
      Test Plan: New tests pass.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, romangg, kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T10867
      
      Differential Revision: https://phabricator.kde.org/D24455
      9f7a856d
  25. 26 Nov, 2019 1 commit
  26. 18 Nov, 2019 1 commit
  27. 05 Nov, 2019 1 commit
  28. 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
  29. 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
  30. 29 Oct, 2019 1 commit
    • Martin Flöser's avatar
      Add support for virgl in GLPlatform · 92197242
      Martin Flöser authored
      Summary:
      This change adds detection support for virgl (Mesa gallium virtio guest driver).
      Results in proper detection in supportInformation and debug console.
      
      Test Plan: Modified test passes, run KWin_Wayland in kvm with virgl and verified supportInformation
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25056
      92197242
  31. 25 Oct, 2019 1 commit
    • Vlad Zahorodnii's avatar
      [scripting] Provide conversion functions for AbstractClient · a738ecce
      Vlad Zahorodnii authored
      Summary:
      If no conversion functions are provided for a QObject-subclass, then
      QScriptEngine will use QScriptEngine::newQObject() method without any
      special options to convert an instance of that QObject-subclass to a
      QScriptValue. However, it's very important that every client object is
      wrapped with PreferExistingWrapperObject option. We need that option
      because a script may set a property on a client object and that property
      must remain until it's deleted by the script.
      
      BUG: 413044
      FIXED-IN: 5.17.2
      
      Test Plan: New test.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24944
      a738ecce