1. 02 Apr, 2020 1 commit
    • 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
  2. 18 Mar, 2020 1 commit
  3. 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
  4. 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
  5. 23 Sep, 2019 4 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
      [wayland] Drop xdg-shell v5 support · 665ec0a5
      Vlad Zahorodnii authored
      Summary:
      Drop xdg-shell v5 support since this protocol is obsolete and all popular
      wayland compositors already did that.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D23573
      665ec0a5
    • Vlad Zahorodnii's avatar
      [autotests] Don't test wl-shell clients · d92d6e77
      Vlad Zahorodnii authored
      Summary:
      This change removes all traces of wl-shell in the test suite. That's a
      prerequisite for dropping wl-shell support in KWin.
      
      Given that wl-shell and xdg-shell are not interchangeable, some tests
      were removed and initialization sequence in some tests was adjusted.
      
      The most notable change is ensuring that each plasmashell window sets
      its role and initial position before committing the surface. Setting
      those properties before the first surface commit is important because
      our window placement code needs to know window type in order to
      avoid maximizing panels, popups, etc.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D23561
      d92d6e77
    • 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
  6. 27 Aug, 2019 1 commit
    • Roman Gilg's avatar
      [platforms/virtual] Create output devices · cd6b69a4
      Roman Gilg authored
      Summary:
      Create output devices in virtual backend. For that the setVirtualOutputs call
      can only come after the Wayland server has been initiliazied such that the
      display exists to create the output and output device interfaces. Tests have
      been adjusted for that.
      
      Test Plan:
      ```
      98% tests passed, 3 tests failed out of 148
      
      Total Test time (real) = 362.97 sec
      
      The following tests FAILED:
               33 - kwin-testInternalWindow (Failed)
               39 - kwin-testPointerInput (Failed)
              101 - kwin-testMoveResize (Failed)
      ```
      Failing of these tests looks unrelated to the change.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11459
      
      Differential Revision: https://phabricator.kde.org/D23477
      cd6b69a4
  7. 07 Jun, 2019 1 commit
    • Roman Gilg's avatar
      [autotests] Fix decoration input test · 2c088894
      Roman Gilg authored
      Since d51b8dc0 the test fails on CI, apparently because we test with
      Breeze default settings, which is no borders now and we can move a bit into
      the window geometry and still be on the border if borders exist, otherwise
      not.
      
      For now fix it by checking if there are borders or not and then test
      accordingly. But long-term we should test both cases and besides not rely on
      external decorations for our test, instead use a fake specific for our
      integration testing.
      2c088894
  8. 20 Jan, 2019 1 commit
  9. 02 Dec, 2018 1 commit
    • Roman Gilg's avatar
      Rework InputDeviceHandler focus tracking · 2e297113
      Roman Gilg authored
      Summary:
      This patch aims at improving the Toplevel, internal window and decoration
      focus tracking.
      
      In detail the goals are:
      * Clean tracking of beneath and focus Toplevel as well as decoration and
      internal windows. Splitting this up in well defined sub routines.
      * Minimal find Toplevel operations on window stack.
      * Reduce code duplication in pointer and touch child classes.
      * Reuse tracking in drag operations.
      * Allow direct usage of Wayland input interfaces for decoration and internal
      windows in the future.
      * Update touch focus on external events like VD switches correctly.
      
      Test Plan: Manually and existing autotests.
      
      Reviewers: #kwin
      
      Subscribers: kwin, zzag
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D15595
      2e297113
  10. 31 Aug, 2018 1 commit
    • Roman Gilg's avatar
      [platforms/virtual] Let VirtualOutput inherit Output · b22c362b
      Roman Gilg authored
      Summary:
      Let VirtualOutput be a child class of the new generic class Output.
      This allows code sharing and a very similar behavior of the Virtual backend
      in comparision to the Drm backend.
      
      Test Plan:
      Autotests succesful with two exceptions: The decoration input test fails on
      testDoubleTap, row topLeft. This is to be expected because now the
      ScreenEdgeInputFilter captures the event at position (0,0) before the
      DecorationEventFilter can capture it. The autotest was adapted to take this
      special case into account.
      
      Also the lockscreen test fails, because the virtual output is currently missing
      the physical size yet.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D11789
      b22c362b
  11. 11 Jun, 2018 1 commit
    • David Edmundson's avatar
      Set specific edge cursor shape when resizing · 5b4eb80c
      David Edmundson authored
      Summary:
      Instead of seeing the cursor <--> on the left edge you now see an icon
      that looks like |<-  .
      
      This brings kwin decorations in line with GTK CSD icons.
      
      In theory this is also useful to tell which window will resize in the
      case of side-by-side windows (regardless of whether borders are on or
      not). In practice with the adwaita icon theme I tested with it's not
      very intuitive to realise which is which till you learn the icon.
      
      Change is more involved than it should be as Qt::CursorShape doesn't
      have these entries, and I don't want to shadow that enum internally or
      have
      to change kwin effect code.
      
      Specifics depend on cursor icon theme if they are not present it will
      fallback to the <--> icon. (Breeze does not have them currently)
      
      Test Plan:
      Resized some windows (on X and on Wayland)
      Correct icon appeared on Adwaita
      Existing icon appeared on Breeze
      
      Reviewers: #plasma
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D13396
      5b4eb80c
  12. 19 May, 2018 1 commit
  13. 19 Mar, 2018 1 commit
    • Roman Gilg's avatar
      [platforms/virtual] Add virtual output class · 8136c272
      Roman Gilg authored
      Summary:
      This matches the DRM backend more closely and allows mid-test removal and
      addition of virtual outputs with different properties in the future.
      
      Test Plan: Before and after 93% tests passed.
      
      Reviewers: #kwin, graesslin
      
      Reviewed By: #kwin, graesslin
      
      Subscribers: graesslin, kwin, #kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D11351
      8136c272
  14. 25 Feb, 2018 1 commit
    • Martin Flöser's avatar
      Send hoverLeave or hoverMotion after touch up on decoration · 911176a8
      Martin Flöser authored
      Summary:
      On touch down a first hover motion is sent to the decoration. Thus e.g. a
      button enters the hovered state. On touch release so far the decoration
      did not get a leave event resulting in the button still being hovered.
      
      This change ensures the leave event is sent or if the pointer is also on
      the decoration a motion to the pointer position is sent.
      
      BUG: 386231
      FIXED-IN: 5.12.3
      
      Test Plan:
      New test case and manual testing to verify that the maximize
      button is no longer hovered after touch down/up on it
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D10308
      911176a8
  15. 15 Nov, 2017 1 commit
  16. 14 Nov, 2017 1 commit
    • Martin Flöser's avatar
      Support modifier+mouse button on window decoration · 5313b856
      Martin Flöser authored
      Summary:
      On X11 modifier+mouse button on the window decoration triggers the
      "special" handling thus as unrestricted move instead of passing the click
      to the decoration. Of course on Wayland we want to have the same
      functionality.
      
      BUG: 386708
      FIXED-IN: 5.11.4
      
      Test Plan: New test case added. PointerInputTest still passes.
      
      Reviewers: #kwin, #plasma, broulik
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D8758
      5313b856
  17. 25 Sep, 2017 1 commit
    • David Edmundson's avatar
      XdgV6 - Kwin side · e492f9e2
      David Edmundson authored
      Summary:
      Adds XDGV6 support for the kwin side.
      
      Popup placement support is limited to the stuff v5 had,
      a simple offset, rather than the awesome new positioner.
      
      But Qt doesn't make use of it yet either.
      Also ideally we should do all the positioning before sending the first
      configure, but again Qt doesn't actually do anything with that anyway.
      
      Also integrate pinging clients
      
      Test Plan: gtk3-demo  works nicely.
      
      Reviewers: #plasma, graesslin, mart
      
      Reviewed By: #plasma, graesslin
      
      Subscribers: mart, graesslin, kwin, plasma-devel, #kwin
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D6591
      e492f9e2
  18. 15 Dec, 2016 1 commit
  19. 05 Oct, 2016 1 commit
    • Martin Flöser's avatar
      Add support for resize only borders on Wayland · fb59b054
      Martin Flöser authored
      Summary:
      This change adds support for resizing outside the window decoration
      (e.g. setting borders to NoSide or None).
      
      To support this a new Toplevel::inputGeometry() -> QRect method is
      added which exposes the geometry adjusted by the margins provided by
      the decoration. This is checked in InputRedirection when finding a
      Toplevel at a given position. The logic for figuring out whether the
      event should go to the decoration or the window already handled the
      situation correctly, so no further changes are needed.
      
      BUG: 364607
      FIXED-IN: 5.8.1
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2787
      fb59b054
  20. 13 Jul, 2016 2 commits
    • Martin Flöser's avatar
      Add support for xdg-shell version 5 interface · c3af4c3f
      Martin Flöser authored
      Summary:
      The WaylandServer creates the XdgShellV5 interface and hooks it up
      to create a ShellSurface whenever an xdg surface or xdg popup is created.
      
      ShellClient gains some new ctors for the different variants and is
      adjusted to delegate to xdg surface respectively.
      
      With this change KWin mostly supports xdg-shell protocol. Still missing
      is support for the "geometry" request which is rather difficult to
      implement in KWin.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2108
      c3af4c3f
    • Martin Flöser's avatar
      Handle situation of no XDG_RUNTIME_DIR gracefully · 3c04d529
      Martin Flöser authored
      Summary:
      If KWin fails to start the Wayland server due to XDG_RUNTIME_DIR not
      being set, kwin_wayland should terminate with an error condition but
      not crash.
      
      This change makes sure that KWin detects that the Wayland server does
      not work and terminates the startup early and ensures that it doesn't
      crash while going down.
      
      An error message is shown that we could not create the Wayland server.
      
      Test Plan:
      Test case added which verifies that WaylandServer fails to
      init. Manual testing that kwin_wayland exits with error 1.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2078
      3c04d529
  21. 01 Jul, 2016 2 commits
    • Martin Flöser's avatar
      [autotest/integration] Add helper for waiting for a shown ShellClient · cf3a1d29
      Martin Flöser authored
      Summary:
      Many tests create a Wayland window, render it and then wait till it's
      created in KWin as a ShellClient. To reduce code duplication the test
      helper provides helper methods to wait for the next ShellClient to be
      shown and to directly render and wait for the window for that to be
      shown.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2057
      cf3a1d29
    • Martin Flöser's avatar
      [autotest/integration] Introduce a Test helper library to have less code duplication · 513878e2
      Martin Flöser authored
      Summary:
      A new namespace KWin::Test is added which provides a few helper
      functions. It makes it easy to setup a KWayland client connection with
      the base set to be able to create a Surface and flags to create
      additional interfaces. This replaces the KWayland connection dance in
      init() methods. For cleanup() there is also a dedicated helper function.
      
      In addition there are helper functions to:
      * render a surface
      * create a surface
      * create a shell surface
      * flush the wayland client connection
      * access to the created interfaces - for compatibility with existing code
      
      The idea is to extend this Test library also for other common use cases
      like creating an X11 connection and X11 windows, etc.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2053
      513878e2
  22. 29 Jun, 2016 1 commit
  23. 17 May, 2016 1 commit
    • Martin Flöser's avatar
      Support touch events in DecorationEventFilter · 73fae5e6
      Martin Flöser authored
      Summary:
      Touch events are emulating mouse events, in particular left mouse
      button.
      
      With this change one can move windows through the decoration, use
      the decoration buttons and also support the double click action.
      
      As finding the decoration is pretty much exactly the same as for
      pointer events, a new base class is introduces which provides the
      functionality of updating the decoration and the shared common
      variables.
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Projects: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1604
      73fae5e6
  24. 12 May, 2016 1 commit
    • Martin Flöser's avatar
      Do not limit mouse actions to titleBarArea but allow on complete titleBarPosition · 14d12c05
      Martin Flöser authored
      Summary:
      Mouse actions like wheel and double click were restricted to the titleBar
      area. This made the top most pixel non-interactive as it's not part of the
      titleBarArea.
      
      This change makes the complete titlebarPosition interactive. That is it
      includes for a "normal" (top) setup also the TopLeft/Top/Right section.
      Thus the top most pixel can be double clicked, mouse wheeled, etc.
      
      For the Wayland case the test case is adjusted.
      
      BUG: 362860
      FIXED-IN: 5.7.0
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Projects: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1596
      14d12c05
  25. 07 Apr, 2016 2 commits
  26. 11 Mar, 2016 1 commit
  27. 17 Feb, 2016 1 commit
  28. 11 Feb, 2016 1 commit
  29. 04 Feb, 2016 4 commits
  30. 08 Oct, 2015 1 commit