1. 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
  2. 18 Mar, 2020 1 commit
    • Vlad Zahorodnii's avatar
      [server] Introduce SurfaceInterface::boundingRect() · deb476e4
      Vlad Zahorodnii authored
      Summary:
      The new method provides a convenient way for determining the rectangle
      that bounds the given surface and all of its sub-surfaces. This can be
      very handy when determining the effective window geometry.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: apol, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27828
      deb476e4
  3. 16 Mar, 2020 1 commit
  4. 12 Mar, 2020 1 commit
  5. 07 Mar, 2020 3 commits
  6. 06 Mar, 2020 1 commit
  7. 21 Feb, 2020 1 commit
    • Daniel Vrátil's avatar
      Registry: don't destroy the callback on globalsync · 4ceb3567
      Daniel Vrátil authored
      Summary:
      Instead just unref it, because the wl_display_dispatch_queue_pending
      will try to destroy the callback afterwards as well, leading to
      invalid read/write.
      
      Fixes Valgrind warnings when running KScreen tests:
      ```
      ==460922== Invalid read of size 4
      ==460922==    at 0x5CE5B34: wl_proxy_unref (wayland-client.c:230)
      ==460922==    by 0x5CE5C33: destroy_queued_closure (wayland-client.c:292)
      ==460922==    by 0x5CE74AB: dispatch_queue (wayland-client.c:1591)
      ==460922==    by 0x5CE74AB: wl_display_dispatch_queue_pending (wayland-client.c:1833)
      ==460922==    by 0x4E0240D: KWayland::Client::EventQueue::dispatch() (src/frameworks/kwayland/src/client/event_queue.cpp:96)
      g==460922==  Address 0x17233aac is 44 bytes inside a block of size 80 free'd
      ==460922==    at 0x483B9F5: free (vg_replace_malloc.c:540)
      ==460922==    by 0x4E15B60: destroy (src/frameworks/kwayland/src/client/wayland_pointer_p.h:63)
      ==460922==    by 0x4E15B60: KWayland::Client::Registry::Private::globalSync(void*, wl_callback*, unsigned int) (src/frameworks/kwayland/src/client/registry.cpp:548)
      ...
      ==460922==    by 0x5CE74AB: dispatch_queue (wayland-client.c:1591)
      ==460922==    by 0x5CE74AB: wl_display_dispatch_queue_pending (wayland-client.c:1833)
      ==460922==    by 0x4E0240D: KWayland::Client::EventQueue::dispatch() (src/frameworks/kwayland/src/client/event_queue.cpp:96)
      ```
      
      Test Plan: Run testkwaylandbackend from libkscreen under Valgrind - no more invalid reads
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27538
      4ceb3567
  8. 12 Feb, 2020 2 commits
  9. 09 Feb, 2020 1 commit
  10. 06 Feb, 2020 1 commit
  11. 01 Feb, 2020 1 commit
  12. 24 Jan, 2020 1 commit
  13. 23 Jan, 2020 1 commit
  14. 14 Jan, 2020 1 commit
  15. 11 Jan, 2020 1 commit
  16. 03 Jan, 2020 1 commit
  17. 30 Dec, 2019 2 commits
  18. 21 Dec, 2019 1 commit
  19. 14 Dec, 2019 1 commit
  20. 09 Dec, 2019 1 commit
  21. 07 Dec, 2019 2 commits
  22. 03 Dec, 2019 1 commit
  23. 27 Nov, 2019 1 commit
    • Roman Gilg's avatar
      [server] Do not own dmabuf implementation · 005a8ede
      Roman Gilg authored
      Summary:
      The dmabuf implementation should be managed by the compositor and not by the
      interface which might go away through signals while the implementation goes
      away in the compositor simultaneously.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D25576
      005a8ede
  24. 26 Nov, 2019 1 commit
    • Vlad Zahorodnii's avatar
      [server] Make double-buffered properties in xdg-shell double-buffered · d0b3eab8
      Vlad Zahorodnii authored and Vlad Zahorodnii's avatar Vlad Zahorodnii committed
      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
  25. 22 Nov, 2019 1 commit
  26. 10 Nov, 2019 1 commit
  27. 03 Nov, 2019 1 commit
  28. 02 Nov, 2019 1 commit
  29. 24 Oct, 2019 1 commit
  30. 22 Oct, 2019 2 commits
  31. 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
  32. 15 Oct, 2019 1 commit
  33. 12 Oct, 2019 1 commit
  34. 06 Oct, 2019 1 commit