1. 14 Feb, 2021 1 commit
    • Vlad Zahorodnii's avatar
      Redesign client buffer management · e43ca8d9
      Vlad Zahorodnii authored
      With the current design, both kwayland-server and kwin are involved in
      getting opengl textures from client buffers. This is somewhat goes
      against the purpose of kwayland-server, which is to simplify writing
      wayland compositors. Dealing with EGLImage or linux dmabuf buffers is
      not difficult, but it involves a lot of boilerplate code, which ideally
      needs to be in a library.
      Another confusing thing about our current buffer abstractions is that
      referenced buffers can be destroyed. It makes some parts of kwin hard to
      understand. The whole purpose of the ref'ing is to ensure that nothing
      will be destroyed while it's being used by the compositor. Furthermore,
      buffers are not automatically ref'ed/unref'ed.
      In order to keep things extensible and less error prone, this change
      rewrite the buffer management bits so the compositors don't have to
      implement their own code path for getting OpenGL textures from client
      buffers. This is also a necessary step towards asynchronous uploading
      of data from shared memory buffers to textures and proper implementation
      of the linux explicit synchronization protocol.
      With the new design, the most important classes are ClientBufferRef and
      The ClientBuffer is an internal type, and it represents the actual
      buffer. The ClientBufferRef is a reference to a ClientBuffer. As long as
      there is a reference, the associated buffer cannot be modified by the
      ClientBufferRef acts as a "smart pointer." It will keep the reference
      count up to date as you copy or move ClientBufferRefs objects. If the
      refcount reaches 0, the buffer will be released automatically.
      In the event of the underlying buffer resource getting destroyed, for
      example if the app has crashed, the corresponding ClientBuffer will not
      be destroyed. All existing references will remain valid.
      Some plugins, e.g. linux-dmabuf-v1, need an EGLDisplay or a way to get
      notified when a graphical reset has occurred. For this particular reason
      the RendererInterface class has been introduced that acts as a bridge
      between the renderer and the rest of buffer management.
      Note that the wayland-eglstream plugin is licensed under GPL-2.0+
      because some of its code was copied from kwin.
  2. 11 Feb, 2021 1 commit
  3. 02 Feb, 2021 2 commits
  4. 30 Jan, 2021 1 commit
  5. 29 Jan, 2021 1 commit
  6. 26 Jan, 2021 2 commits
  7. 21 Jan, 2021 4 commits
  8. 12 Jan, 2021 1 commit
    • David Edmundson's avatar
      Send SurfaceInterface::enter events after clients bind to outputs · e1e3a4a0
      David Edmundson authored
      The following order of events are legal:
      Typically order is:
       - server announces a new output
       - client binds to a new output
       - server updates the surface to be on new output
      But we can have events occur in the following order:
       - server announces a new output
       - server updates the surface to be on new output
       - client binds to a new output
      At which point when we update the surface there is no ID to tell the
      client which output the surface is on.
      This patch watches for clients binding to output and updates
  9. 06 Jan, 2021 4 commits
  10. 05 Jan, 2021 1 commit
  11. 16 Dec, 2020 1 commit
  12. 14 Dec, 2020 2 commits
    • Andrey Butirsky's avatar
      keyboard_interface: Always update modifiers cache · f67daa07
      Andrey Butirsky authored
      We send modifiers to the active client when they change, and when we
      focus an existing client we send the cached state.
      For this reason it's important we always update our internal store of
      modifiers regardless of whether a surface is currently active.
      Unit test is adopted accordingly.
      BUG: 429930
    • Vlad Zahorodnii's avatar
      Remove factory methods in Display · 725e97aa
      Vlad Zahorodnii authored
      The main reason why we have factory methods is that up to some point,
      kwayland had its own signal to indicate when globals have to be removed.
      Now that all globals add destroy listeners for the wl_display object,
      we don't have that signal. Most factory methods are equivalent to doing
      new T(display).
      Besides adding unnecessary boilerplate code, another reason to get rid
      of the factory methods is to reduce the amount of merge conflicts. If
      several persons work on implementing wayland protocols at the same time,
      sooner or later someone will have to resolve merge conflicts in Display.
  13. 12 Dec, 2020 1 commit
  14. 09 Dec, 2020 3 commits
  15. 07 Dec, 2020 1 commit
  16. 01 Dec, 2020 1 commit
  17. 27 Nov, 2020 1 commit
  18. 19 Nov, 2020 1 commit
  19. 17 Nov, 2020 2 commits
    • Aleix Pol Gonzalez's avatar
      Notify subsurfaces about output changes · c58ea3e8
      Aleix Pol Gonzalez authored
      Otherwise they wouldn't notice and wouldn't update to the settings of
      the new output, like the new output's scaling.
    • David Edmundson's avatar
      Allow small timeout intervals in IdleInterface · 9cf51bb1
      David Edmundson authored
      A threshold exists to stop users flooding the server for no reason.
      However, there is a usecase for small timeouts.
      rsibreak has a "please relax for 20 seconds" interface. Here it makes
      perfect sense to know if a user is active in small increments. The plan
      is to start a 1s timer and wait for that. Then we wait locally for 20s
      without a resume event.
  20. 16 Nov, 2020 1 commit
  21. 11 Nov, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Safely end drag if the source data device gets destroyed · d70552f6
      Vlad Zahorodnii authored
      We cannot end a drag after the destroyed() signal for the source data
      device is emitted because DataDeviceInterface and its d pointer are gone
      by that time.
    • Vlad Zahorodnii's avatar
      Destroy all clients before destroying wl_display · e77f9ac2
      Vlad Zahorodnii authored
      One of the most disappointing things when writing autotests is dealing
      with a race condition where destructor requests are processed after all
      globals have been destroyed.
      With this change, the Display object will destroy all clients and their
      resources before destroying the wl_display object. The good thing about
      doing so is that shut down logic becomes simple. We don't have to assume
      that wl_resource objects can outlive their wl_global objects, etc. The
      bad thing is that it exposed a couple of pre-existing latent bugs in the
      data device and the xdg foreign code.
      closes #2
  22. 10 Nov, 2020 1 commit
  23. 09 Nov, 2020 1 commit
  24. 06 Nov, 2020 1 commit
  25. 05 Nov, 2020 3 commits