1. 31 May, 2020 1 commit
  2. 26 May, 2020 2 commits
    • David Edmundson's avatar
      Manage active selection as active DataSource than DataDevice · f9da1809
      David Edmundson authored
      Summary:
      A DataDevice will have zero or one active DataSource as the seclection.
      
      In the existing code we track the current data device then update it to
      the newest data device
      when the source inside a data device changes.
      
      If we store the active data source inside Seat instead of the device
      everything becomes
      somewhat simpler and safer.
      
      An entire unit test vanishes as that case of an externally set
      DataDevice with no source
      can no longer happen.
      
      There's also a lot of duplication that's been merged in this patch so we
      have one path.
      
      There are some technical behavioural changes in particular we do cleanup
      when the
      source vanishes rather than the data device, but if anything that seems
      safer and more correct.
      
      It's a precursor for introducing an abstraction class round the source
      without needing to meddle
      with too much code.
      
      Test Plan: Relevant unit tests passed, ran with it for a while with no
      issue.
      
      Reviewers: #kwin
      
      Differential Revision: https://phabricator.kde.org/D29328
      f9da1809
    • David Edmundson's avatar
      [BlurInterface] Port to the new approach · 2189579d
      David Edmundson authored
      BlurInterface always used to be my go-to template when starting a new
      protocol, we may as well make it up-to-date with the generation.
      
      Code is reduced by a third.
      2189579d
  3. 20 May, 2020 2 commits
  4. 04 May, 2020 1 commit
  5. 30 Apr, 2020 1 commit
  6. 29 Apr, 2020 2 commits
  7. 24 Apr, 2020 1 commit
    • David Edmundson's avatar
      Add wrapper for wl_global_remove · c557cdba
      David Edmundson authored
      Summary:
      Removes the Global from the registry, but does not delete the underlying
      wl_global
      
      Removal of a global is racey in wayland.
      A client could be trying to bind at that moment.
      
      Typically globals are static for the lifespan of the compositor, however
      there are exceptions
      
      For those cases this call will can remove the global from the registry,
      but still keep the wl_global instance alive
      and handling bind requests.
      
      The compositor can then remove the Global wrapper (this object) deleting
      the wl_global after an arbitrary delay or
      keep it around for re-use for the duration of the compositor.
      
      Test Plan:
      Unit test
      Made blur global outlive BlurEffect - no longer disconnects plasma on config changes
      
      Reviewers: #plasma, apol
      
      Reviewed By: apol
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D28883
      c557cdba
  8. 17 Apr, 2020 1 commit
    • David Edmundson's avatar
      [autotests] Optimistic attempt to fix RemoteAccessTest reilability · 1b141294
      David Edmundson authored
      Summary:
      In this test we are waiting on 4 events. 2 things via 2 threads. It was
      unstable.
      
      This patch avoids hardcoding a bunch of ifs() handling recieving
      different orders, by waiting for both events.
      
      We can't use QTRY_COMPARE as ConnectionThread does magic things with
      QCoreApplication::eventDispatcher which don't work quite the same.
      
      This is a bit of a shot in the dark. It passes 100% of the time locally,
      lets see what CI manages to do :)
      
      Test Plan: Ran test :)
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D28892
      1b141294
  9. 30 Mar, 2020 1 commit
    • Aleix Pol Gonzalez's avatar
      Fix warnings · 3a7f50d5
      Aleix Pol Gonzalez authored
      Summary:
      Remove unused variables and members.
      We were often storing the q of classes without ever needing them. I'd
      just do it when it's useful. We do it in the private class so it can
      always be added, removes boilerplate code.
      
      Don't use std::move when returning temporary QImage. The compiler is
      smart enough to know to do it but produces the warning "moving a
      temporary object prevents copy elision".
      
      Remove unused lambda captured variables.
      
      Test Plan: Getting much cleaner build logs
      
      Reviewers: #frameworks, #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D28442
      3a7f50d5
  10. 24 Mar, 2020 2 commits
  11. 20 Mar, 2020 1 commit
  12. 19 Mar, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Pass a dedicated fd to each keyboard for the xkb keymap · 6bfa71d8
      Vlad Zahorodnii authored
      Summary:
      To better isolate the clients from each other eachh KeyboardInterface
      creates it's own dedicated temporary file and sends the fd for this
      temporary file to the client. This means the memory for the keymap is no
      longer shared between all clients, every client has an own copy.
      
      To support this the existing API to set the keymap is deprecated and
      replaced by a new method setKeymapData which takes the content of the
      keymap as a byte array. The now deprecated method which takes a file
      descriptor is changed to use the new setKeymapData method. For that it
      reads the content of the file.
      
      The implementation in KeyboardInterface to create the file descriptor is
      based on the implementation of KWin. As I implemented the change in KWin
      (see 3b4c508ee36ac74c37e77fcaa14d106397ad2994) it is not a problem from
      GPL vs LGPL perspective.
      
      The change includes test cases to verify that the content of the keymap
      is properly passed to the client and that the memory is no longer shared.
      
      BUG: 381674
      
      Reviewers: #kwin, #frameworks, davidedmundson, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: plasma-devel, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D14910
      6bfa71d8
  13. 16 Mar, 2020 1 commit
  14. 06 Feb, 2020 1 commit
  15. 30 Dec, 2019 1 commit
  16. 07 Dec, 2019 1 commit
  17. 26 Nov, 2019 1 commit
    • Vlad Zahorodnii's avatar
      [server] Make double-buffered properties in xdg-shell double-buffered · d0b3eab8
      Vlad Zahorodnii authored
      Summary:
      So far all double-buffered properties in our implementation of xdg-shell
      weren't actually double-buffered. When a property setter is invoked, we
      pray to the God hoping that the client committed associated surface.
      
      This change introduces private SurfaceRole class. The new class provides
      a way for SurfaceInterface to commit pending state of associated shell
      surface.
      
      The chosen architecture allows us to do more in the future. For example,
      we could use SurfaceRole to prevent associating several roles to a single
      wl_surface object, e.g. xdg-toplevel to a pointer surface, etc.
      
      Test Plan: This change breaks support for client-side decorated clients in KWin.
      
      Reviewers: #kwin
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D23745
      d0b3eab8
  18. 22 Oct, 2019 1 commit
  19. 20 Oct, 2019 1 commit
    • Friedrich W. H. Kossebau's avatar
      Use ECMGenerateExportHeader to manage deprecated API better · 1fb1906a
      Friedrich W. H. Kossebau authored
      Summary:
      Allows
      * projects linking to KWayland to hide deprecated API up to a
        given version or silence deprecation warnings after a given version,
        using
        * -DKWAYLAND_DISABLE_DEPRECATED_BEFORE_AND_AT
        * -DKWAYLAND_NO_DEPRECATED
        * -DKWAYLAND_DEPRECATED_WARNINGS_SINCE
        * -DKWAYLAND_NO_DEPRECATED_WARNINGS
      
        or
        * -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT
        * -DKF_NO_DEPRECATED
        * -DKF_DEPRECATED_WARNINGS_SINCE
        * -DKF_NO_DEPRECATED_WARNINGS
      
      No support for "EXCLUDE_DEPRECATED_BEFORE_AND_AT", needs to be done by
      someone with detailed knowledge about disabling implementation, if wanted.
      
      Reviewers: #kwin
      
      Subscribers: zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D24663
      1fb1906a
  20. 17 Sep, 2019 1 commit
  21. 17 May, 2019 2 commits
  22. 14 May, 2019 1 commit
    • David Edmundson's avatar
      Implement set_window_geometry · 6da6c7c7
      David Edmundson authored
      Summary:
      Used by clients to say where their true window geometry is relative to
      the buffer size. Important if a client has client side shadows which
      shouldn't be included for positioning tasks.
      
      Technically this should be double buffered, but for consistency with all
      other XdgShell properties this will be a task left to ShellClient.
      
      Test Plan: Unit test
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D20595
      6da6c7c7
  23. 08 May, 2019 1 commit
    • Roman Gilg's avatar
      Implement wl_surface::damage_buffer · b71e1035
      Roman Gilg authored
      Summary:
      Missing from our surface handling was the damage_buffer call introduced in
      version 4 of the wl_compositor interface.
      
      Its only difference to a normal damage call is that the damaged region is
      supposed to be defined by the client in buffer coordinates instead of
      surface coordinates. This damage must be tracked separately in KWayland
      and on commit with the buffer transformation united with the normal damage.
      
      Test Plan: Autotest updated.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D15910
      b71e1035
  24. 02 May, 2019 1 commit
  25. 04 Mar, 2019 1 commit
    • David Edmundson's avatar
      Hopefully fix flaky remote access test · f0152135
      David Edmundson authored
      Summary:
      We have 4 events:
      
      buffer1 created
      buffer2 created
      buffer1 paramters sent
      buffer2 paramters sent
      
      Some are batched
      
      We should connect to buffer 1's parameters being sent after the first
      buffer is recieved, not in the potential event loop waiting for buffer
      2.
      
      Test Plan:
      Passes locally
      Haven't tested on build.k.o
      
      Reviewers: #kwin
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D19476
      f0152135
  26. 14 Feb, 2019 1 commit
  27. 12 Feb, 2019 1 commit
    • David Edmundson's avatar
      Add explicit SurfaceInterface::commited signal · b2f67e1d
      David Edmundson authored
      Summary:
      Whilst some interfaces that are double-buffered against the wl_surface
      are proxied through SurfaceInterface, some are not, most notably
      XdgShell.
      
      We need some low level signal to know when the surface has been
      committed which doesn't rely on their being a damaged buffer.
      
      Test Plan:
      Unit test
      Used in kwin
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D18582
      b2f67e1d
  28. 31 Jan, 2019 1 commit
  29. 22 Jan, 2019 2 commits
  30. 21 Dec, 2018 1 commit
    • David Edmundson's avatar
      Xdg Decoration Support · 46390781
      David Edmundson authored
      Summary:
      Usual massive boilerplate.
      
      Should allow us to remove the injection in our QPT, as Qt 5.12 implements
      this protocol directly. Will probably be relevant for other toolkits as
      it's more standardised than our custom one.
      
      Client is mostly 1:1 with the protocol, server side has some tweaking to
      fit with kwayland turning an event based API into a state based one.
      
      Test Plan:
      Relevant unit test
      Tried in modified kwin with our QPT disabled
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D17498
      46390781
  31. 02 Dec, 2018 1 commit
    • Roman Gilg's avatar
      [server] Touch drag support · 09b5adee
      Roman Gilg authored
      Summary: Adds functionality to do drag and drop with touch screens.
      
      Test Plan: Manually. Autotest planned.
      
      Reviewers: #kwin, #frameworks, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D15464
      09b5adee
  32. 15 Nov, 2018 3 commits