1. 16 Sep, 2021 2 commits
  2. 10 Sep, 2021 2 commits
    • David Edmundson's avatar
      Only guard DND cancel events with the version check · a6a4760c
      David Edmundson authored and Vlad Zahorodnii's avatar Vlad Zahorodnii committed
      In a recent refactor a guard seemingly in the wrong place on
      SeatInterface was moved into AbstractDataSource, as typically that's
      where we guard.
      
      However it turns out the original code was correct, we want to send
      cancel for all clipboard cancels, but for D&D it's version dependent.
      
      This class introduces a new method to astract that from seat.
      a6a4760c
    • Vlad Zahorodnii's avatar
      Fix a typo · 0c11cc1d
      Vlad Zahorodnii authored
      It makes more sense to test primarySelection().
      0c11cc1d
  3. 09 Sep, 2021 2 commits
    • David Redondo's avatar
      Introduce AbstractDropHandler · 955bcd0d
      David Redondo authored and David Edmundson's avatar David Edmundson committed
      This abstract class represents an object that receives drag and drop
      events.
      This roughly maps to some of DataDevice's receiving methods, but by
      being abstract
      also allows us to use the same code from xwayland in a manner
      transparent to all
      code paths.
      
      Preivous xwayland support with "proxy surfaces" have been removed.
      
      --
      In future it will be extended to have the mouse move events, so that we
      can
      avoid spying on the seat both in dataDevice and kwin's internal filter
      955bcd0d
    • David Redondo's avatar
      Move drag logic to seat and introduce SeatInterface::startDrag · ce1e9992
      David Redondo authored and David Edmundson's avatar David Edmundson committed
      A dataDevice has a request to start a drag with multiple parameters.
      As kwayland's goal is to turn an event-driven API into a property cache API we
      store this data. This patch moves that storage to the Seat as properties of the
      active drag, rather than a property of the data device that happened to
      initialise it.
      
      This both helps keep a lot of other logic together, but also allows us to expose
      a public startDrag method that can be invoked from Kwin's internal surfaces or
      xwayland.
      
      Any properties in DataDevice now relate to data being dropped on the device.
      ce1e9992
  4. 07 Sep, 2021 1 commit
  5. 03 Sep, 2021 2 commits
  6. 02 Sep, 2021 1 commit
  7. 01 Sep, 2021 4 commits
  8. 31 Aug, 2021 1 commit
  9. 29 Aug, 2021 2 commits
  10. 28 Aug, 2021 2 commits
  11. 25 Aug, 2021 1 commit
  12. 24 Aug, 2021 1 commit
  13. 19 Aug, 2021 1 commit
  14. 16 Aug, 2021 1 commit
  15. 12 Aug, 2021 2 commits
  16. 06 Aug, 2021 1 commit
  17. 04 Aug, 2021 1 commit
    • Manuel Stoeckl's avatar
      Add a few 30-bit wl_shm formats · 7b59790c
      Manuel Stoeckl authored
      Register WL_SHM_FORMAT_ARGB2101010 and its XRGB,ABGR, and XBGR variants.
      These (little-endian) formats are only advertised on little endian
      machines, where there exist matching (native-endian) QImage formats.
      7b59790c
  18. 29 Jul, 2021 1 commit
    • Vlad Zahorodnii's avatar
      Allocate less memory for every wl_callback · 02267a32
      Vlad Zahorodnii authored
      wl_callback and wl_region are two kinds of objects that are frequently
      allocated.
      
      Currently, we make two extra heap allocations per each wl_callback
      object. One for the wrapper object (FrameCallback) and the other one is
      for its Resource.
      
      With this change, no extra allocations will be made. Also, due to
      relying on wl_resource linked lists, the destroy listener implementation
      got much simpler.
      
      This won't result in huge memory usage or performance improvements, but
      still it's worth reducing the number of memory allocations where possible.
      02267a32
  19. 28 Jul, 2021 4 commits
    • Vlad Zahorodnii's avatar
      Search for Xwayland surfaces differently · 7655551c
      Vlad Zahorodnii authored
      Currently, we store all surfaces in a single list and use linear search
      to find the SurfaceInterface by its object id and client connection.
      
      With this, we first search for the wl_resource object by its id. Once we
      have a wl_resource, SurfaceInterface::get(wl_resource) can be used.
      
      The main advantage of the proposed solution is that we don't need to
      maintain a static list with all SurfaceInterface objects.
      7655551c
    • Vlad Zahorodnii's avatar
      Drop ClientConnection::createResource() · 1a47dfe7
      Vlad Zahorodnii authored
      It's leftover after now gone Global and Resource.
      1a47dfe7
    • Vlad Zahorodnii's avatar
      4c6659f3
    • Vlad Zahorodnii's avatar
      Ignore dpms status in Display::outputsIntersecting() · 999fd82b
      Vlad Zahorodnii authored
      Display::outputsIntersecting() is used to compute the list of outputs
      where the given surface is. The problem is that it accounts for the dpms
      mode.
      
      This means that if an output is turned off, clients will receive a leave
      event and they may potentially decide to change the buffer scale and
      commit new buffers.
      
      The dpms check was introduced to fix a crash, however since then, output
      bits in kwin have changed drastically, in particular how wl_output
      objects are destroyed. So, it should be safe to remove the dpms check.
      999fd82b
  20. 27 Jul, 2021 1 commit
  21. 23 Jul, 2021 2 commits
  22. 22 Jul, 2021 3 commits
    • Vlad Zahorodnii's avatar
      Reference shm pool for destroyed buffers · c2ae2301
      Vlad Zahorodnii authored
      Currently, if an application is closed, all of its shm buffers will be
      destroyed. However, the compositor may want to access them to fade out
      the window.
      
      With this change, the underlying shm pool will be referenced when a shm
      buffer is destroyed. So, the compositor can access buffer data even if
      the buffer is destroyed.
      c2ae2301
    • Vlad Zahorodnii's avatar
      Drop Global and Resource classes · 909f00c9
      Vlad Zahorodnii authored
      They're unused.
      909f00c9
    • Vlad Zahorodnii's avatar
      Split BufferInterface · b8e59cb6
      Vlad Zahorodnii authored
      Currently, the BufferInterface encapsulates all the kinds of client
      buffers. This has become a somewhat annoying issue as we want to
      reference the shm pool if a shm buffer is destroyed, or have custom
      buffer readiness logic for linux dma-buf client buffers.
      
      Implementing all of that with the current abstractions will be
      challenging as there's no good separation between different client
      buffer types.
      
      This change splits the BufferInterface class in three sub-classes -
      DrmClientBuffer, LinuxDmaBufV1ClientBuffer, and ShmClientBuffer.
      
      In addition to that, this change fixes the broken buffer ref'ing api.
      b8e59cb6
  23. 21 Jul, 2021 2 commits