1. 05 Nov, 2020 1 commit
  2. 03 Nov, 2020 1 commit
  3. 21 Oct, 2020 1 commit
    • Bhushan Shah's avatar
      input: reconfigure after setting up the libinput · 733692f4
      Bhushan Shah authored
      Previously seat interface was keeping track of the repeat information,
      but now it is taken care by KeyboardInterface, which is created only if
      the setHasKeyboard is set to true.
      
      So, since we are setting up various capabilities on seat in libinput,
      re-parse configuration here, so that various information like key repeat
      is notified to kwayland-server
      
      BUG: 428039
      733692f4
  4. 17 Oct, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Adapt to input region changes in kwayland-server · 41d431de
      Vlad Zahorodnii authored
      SurfaceInterface::inputIsInfinite() has been dropped. If the surface has
      no any input region specified, SurfaceInterface::input() will return a
      region that corresponds to the rect of the surface (0, 0, width, height).
      
      While the new design is more robust, for example it's no longer possible
      to forget to check SurfaceInterface::inputIsInfinite(), it has shown some
      issues in the input stack of kwin.
      
      Currently, acceptsInput() will return false if you attempt to click the
      server-side decoration for a surface whose input region is not empty.
      
      Therefore, it's possible for an application to set an input region with
      a width and a height of 1. If user doesn't know about KSysGuard or the
      possibility of closing apps via the task manager, they won't be able to
      close such an application.
      
      Another issue is that if an application has specified an empty input
      region on purpose, user will be still able click it. With the new
      behavior of SurfaceInterface::input(), this is no longer an issue and it
      is handled properly by kwin.
      41d431de
    • Vlad Zahorodnii's avatar
      Introduce geometry conversion helpers · ba4f6b35
      Vlad Zahorodnii authored
      The new helpers are designed for the purpose of mapping points from the
      global screen coordinates to the frame-local and the surface-local coords
      ba4f6b35
  5. 08 Sep, 2020 1 commit
    • David Edmundson's avatar
      Avoid QPointer in return types of Input methods · 6acf35e4
      David Edmundson authored
      QPointer is a really useful way to store a pointer over time.
      It doesn't make have any value as a return value used by a short-lived
      method.
      
      There isn't a good copy constructor, it's effectively the same as
      creating a new QWeakPointer reference that has to be cleaned up.
      
      Testing if something is null is still the same. A new QPointer can be
      made by the caller if it actually is needed.
      
      Input handling is a very hot path called many times a frame, so it's
      important to keep this light. focus() and at() are called a lot which
      added up to slightly over 1% of CPU time when moving the mouse about.
      6acf35e4
  6. 17 Aug, 2020 1 commit
  7. 11 Aug, 2020 2 commits
    • Aleix Pol Gonzalez's avatar
      tablet: acknowledge that findTabletSeat might return nullptr · 1ad88bdf
      Aleix Pol Gonzalez authored
      Never hit that case, but I figured it makes sense to account for the
      case now since we have several paths that return nullptr.
      1ad88bdf
    • Xaver Hugl's avatar
      Send out an additional TabletMove event before TabletPress. · 3a85b57e
      Xaver Hugl authored
      Sometimes when a user puts the pen down too fast a TabletPress event will get triggered before a TabletMove event can occur. The app then assumes the user moved the pen very fast to the new position. The old position is there either (0,0), which often triggers the menu, or the last position the app received, which triggers apps like Xournal++ and Krita to paint a line from the old to the new position.
      3a85b57e
  8. 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
  9. 13 Jul, 2020 1 commit
    • Aleix Pol Gonzalez's avatar
      Move inputConfig away from KWin::Application · e28e4cb1
      Aleix Pol Gonzalez authored
      We were calling it from tests that were not running a KWin::Application
      and not even including the symbols from main.cpp and main.h. The only
      reason they linked was that it was static_casting up the QCoreApplication.
      e28e4cb1
  10. 08 Jul, 2020 1 commit
  11. 24 Jun, 2020 1 commit
  12. 22 Jun, 2020 1 commit
    • David Edmundson's avatar
      Fix build with loadThemeCursor templates · 34c1bccd
      David Edmundson authored
      WaylandCursorImage::loadThemeCursor(const T &shape) uses templates.
      These templates are used by input.cpp but the deifnition is in
      pointer_input.cpp
      
      On some setups this creates a compilation problem.
      
      This patch introduces an explicit non-templated declaration with the
      defintion explicitly complied into the same class.
      
      In master this has been refactored away anyway, so this is a minimal
      patch to make things working in the least invasive way.
      
      BUG: 423052
      34c1bccd
  13. 29 May, 2020 1 commit
  14. 30 Apr, 2020 1 commit
  15. 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
      Improve PowerOff/PowerDown behaviour · f4e41430
      Aleix Pol Gonzalez authored
      Summary:
      Trigger PowerDown after pressing for 1s instead of having to wait for release
      to decide, feels more natural.
      Also don't operate the modifiers, it's done later by KGlobalAccel.
      
      Reviewers: #kwin, #plasma:_mobile, bshah
      
      Reviewed By: #plasma:_mobile, bshah
      
      Subscribers: ngraham, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D28490
      f4e41430
  16. 20 Mar, 2020 2 commits
  17. 17 Mar, 2020 1 commit
    • Aleix Pol Gonzalez's avatar
      Fix compiler warnings · cca0e15b
      Aleix Pol Gonzalez authored
      Summary: No need to keep them around for no reason.
      
      Test Plan: Tested the plugins I thought could be affected. Have been using it for a couple of days without problems
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D28062
      cca0e15b
  18. 04 Mar, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Use AbstractClient instead of XdgShellClient wherever possible · be759b7d
      Vlad Zahorodnii authored
      Summary:
      Currently, we have only one shell client type - XdgShellClient. We use
      it when we are dealing with Wayland clients. But it isn't really a good
      idea because we may need to support shell surfaces other than xdg-shell
      ones, for example input panel surfaces.
      
      In order to make kwin more extensible, this change replaces all usages
      of the XdgShellClient class with the AbstractClient class.
      
      Test Plan: Existing tests pass.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27778
      be759b7d
  19. 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
  20. 06 Feb, 2020 1 commit
    • Aleix Pol Gonzalez's avatar
      Send a Qt::Key_PowerDown when long pressing the power button · b9423a03
      Aleix Pol Gonzalez authored
      Summary:
      This will be useful to be able to show a menu on long press and just
      lock the screen on normal press, especially useful on phones and
      tablets.
      
      Test Plan:
      Could not test much because on laptops doesn't work. Would need more
      investigation. discussed further on the plasma mailing list.
      
      Reviewers: #plasma, davidedmundson
      
      Reviewed By: #plasma, davidedmundson
      
      Subscribers: z3ntu, davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26899
      b9423a03
  21. 23 Jan, 2020 1 commit
  22. 14 Jan, 2020 1 commit
  23. 10 Dec, 2019 2 commits
  24. 27 Nov, 2019 1 commit
    • 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
  25. 14 Nov, 2019 1 commit
    • David Edmundson's avatar
      [effects] Forward wheel events · aedc9e62
      David Edmundson authored
      Summary:
      Effects::checkInputWindowEvent(QWheelEvent *e) existed but it was not
      hooked up to anything and would never be called.
      
      This patch adds the relevant handling in the wayland filter, X filter so
      the existing method gets called.
      
      EffectQuickView is updated to handle wheel events.
      
      Test Plan:
      Used a ListView via an EffectQuickView in an effect.
      I can now scroll with the mouse.
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25292
      aedc9e62
  26. 22 Oct, 2019 1 commit
  27. 02 Oct, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Rename geometry property to frameGeometry · 7d4471eb
      Vlad Zahorodnii authored
      Summary:
      In order to properly implement xdg_surface.set_window_geometry we need
      two kinds of geometry - frame and buffer. The frame geometry specifies
      visible bounds of the client on the screen, excluding client-side drop
      shadows. The buffer geometry specifies rectangle on the screen that the
      attached buffer or x11 pixmap occupies on the screen.
      
      This change renames the geometry property to frameGeometry in order to
      reflect the new meaning assigned to it as well to make it easier to
      differentiate between frame geometry and buffer geometry in the future.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24334
      7d4471eb
  28. 29 Sep, 2019 1 commit
  29. 25 Sep, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Rename Client to X11Client · ffcbe24e
      Vlad Zahorodnii authored
      Summary:
      Currently each managed X11 client is represented with an instance of
      Client class, however the name of that class is very generic and the
      only reason why it's called that way is because historically kwin
      was created as an x11 window manager, so "Client" was a sensible choice.
      
      With introduction of wayland support, things had changed and therefore
      Client needs to be renamed to X11Client in order to better reflect what
      that class stands for.
      
      Renaming of Client to X11Client was agreed upon during the last KWin
      sprint.
      
      Test Plan: Compiles, the test suite is still green.
      
      Reviewers: #kwin, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: romangg, davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24184
      ffcbe24e
  30. 23 Sep, 2019 2 commits
    • Vlad Zahorodnii's avatar
      Rename ShellClient to XdgShellClient · 168ea988
      Vlad Zahorodnii authored
      Summary:
      Rename ShellClient to XdgShellClient in order to reflect that it
      represents only xdg-shell clients.
      
      Test Plan: Compiles, tests still pass.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D23589
      168ea988
    • Vlad Zahorodnii's avatar
      Port QPA away from Wayland · bebe8120
      Vlad Zahorodnii authored
      Summary:
      So far wayland was used by internal clients to submit raster buffers
      and position themselves on the screen. While we didn't have issues with
      submitting raster buffers, there were some problems with positioning
      task switchers. Mostly, because we had effectively two paths that may
      alter geometry.
      
      A better approach to deal with internal clients is to let our QPA use
      kwin core api directly. This way we can eliminate unnecessary roundtrips
      as well make geometry handling much easier and comprehensible.
      
      The last missing piece is shadows. Both Plasma::Dialog and Breeze widget
      style use platform-specific APIs to set and unset shadows. We need to
      add shadows API to KWindowSystem. Even though some internal clients lack
      drop-shadows at the moment, I don't consider it to be a blocker. We can
      add shadows back later on.
      
      CCBUG: 386304
      
      Reviewers: #kwin, davidedmundson, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: romangg, kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T9600
      
      Differential Revision: https://phabricator.kde.org/D22810
      bebe8120