1. 31 May, 2020 1 commit
  2. 29 May, 2020 2 commits
  3. 28 May, 2020 1 commit
  4. 26 May, 2020 3 commits
    • David Edmundson's avatar
      Add DataControl iface · d8b553e7
      David Edmundson authored
      Summary:
      This patch makes use of wlroot's DataControl interface to support
      clipboard management.
      
      Unlike wl_data_device clipboards are sent on every change to all
      watchers.
      If the data device has a selection set it updates immediately.
      
      Because it was started a year ago it uses the existing style of
      wrapping objects. The unit test uses the new approach.
      
      Test Plan:
      Updated kwin
      used wlroot's wl-copy, wl-paste which are xclip replacements to
      show that the clipboard updated correctly
      
      Reviewers: #kwin
      
      Differential Revision: https://phabricator.kde.org/D29330
      d8b553e7
    • 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
  5. 20 May, 2020 2 commits
  6. 18 May, 2020 1 commit
  7. 04 May, 2020 1 commit
  8. 30 Apr, 2020 1 commit
  9. 29 Apr, 2020 2 commits
  10. 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
  11. 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
  12. 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
  13. 24 Mar, 2020 2 commits
  14. 20 Mar, 2020 1 commit
  15. 19 Mar, 2020 2 commits
    • Aleix Pol Gonzalez's avatar
      Provide an implementation for the tablet interface · a009c8c0
      Aleix Pol Gonzalez authored
      Summary:
      Implements the necessary classes to have proper support for the tablet and pen.
      Doesn't implement yet the ring/slider/totem bits.
      
      Test Plan:
      Used it with Plasma and GTK clients, together with the kwin patch I'll submit soon.
      https://youtu.be/GGx0TlNJlzs
      
      Also I added a test.
      
      Reviewers: #kwin, #frameworks, zzag, davidedmundson
      
      Reviewed By: #kwin, zzag, davidedmundson
      
      Subscribers: davidedmundson, zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D26858
      a009c8c0
    • 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
  16. 16 Mar, 2020 1 commit
  17. 06 Feb, 2020 1 commit
  18. 30 Dec, 2019 1 commit
  19. 07 Dec, 2019 1 commit
  20. 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
  21. 22 Oct, 2019 1 commit
  22. 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
  23. 17 Sep, 2019 1 commit
  24. 17 May, 2019 2 commits
  25. 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
  26. 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
  27. 02 May, 2019 1 commit
  28. 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
  29. 14 Feb, 2019 1 commit
  30. 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
  31. 31 Jan, 2019 1 commit
  32. 25 Jan, 2019 1 commit
    • Fabian Vogt's avatar
      Add option to use wl_display_add_socket_auto · d671fcd0
      Fabian Vogt authored
      Summary:
      If automaticSocketNaming is enabled, it will use wl_display_add_socket_auto
      to allocate the next free socket. The resulting name can be retrieved using
      socketName after a successful start afterwards.
      
      Test Plan: Ran the new autotest, passes. kwin_wayland still uses the old behaviour.
      
      Reviewers: #kwin, #plasma, romangg
      
      Reviewed By: #kwin, #plasma, romangg
      
      Subscribers: davidedmundson, zzag, romangg, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D17122
      d671fcd0