1. 16 Jul, 2020 1 commit
  2. 15 Jul, 2020 1 commit
  3. 14 Jul, 2020 1 commit
  4. 30 Jun, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Provide an easy way to monitor buffer size changes · fd995084
      Vlad Zahorodnii authored
      The main purpose behind the kwaylandserver library is to provide a set
      of re-usable wayland compositor extension implementations. However, it's
      worth noting that the design of kwaylandserver is far from perfect at
      the moment.
      
      KWaylandServer tries to hide all low level wayland details from the
      compositor. But it's not the case with buffers, which diminishes the
      whole point behind the library.
      
      Creating OpenGL textures from Wayland buffers is the responsibility of
      the compositor. So, when it comes to client buffers, we are one foot in
      KWaylandServer, and the other foot in the compositor.
      
      Since the surface size is a logical size, the compositor can't use it
      for allocating memory for OpenGL textures. This change adds the buffer
      size property in SurfaceInterface that can be used for allocating memory
      for textures as well as monitoring buffer size changes.
      
      I must say that the introduction of the buffer size property is a crude
      hack because BufferInterface just needs to provide an OpenGL texture for
      each plane. The main blocker for that is that it would involve moving
      the backend, the compositor, and the wayland bits in the same place, for
      example kwayland-server or ultimately kwin.
      fd995084
  5. 24 Jun, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Document the buffer transform property · 39a27ec2
      Vlad Zahorodnii authored
      The buffer transform is a pretty confusing thing, so document it in
      order to avoid misleading people.
      39a27ec2
    • Vlad Zahorodnii's avatar
      Rename buffer-specific surface properties · 47f80b99
      Vlad Zahorodnii authored
      The buffer scale and the buffer transform property specify transforms
      that had been applied to the buffer's contents. Neither one of those
      properties apply to the surface, in other words the buffer transform
      property doesn't indicate that the surface was rotated or flipped or both.
      
      This change doesn't gain anything in terms of new features, etc. It just
      attempts to make things more clear.
      47f80b99
  6. 19 Jun, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Drop SurfaceInterface::inputIsInfitine · 832f5bdd
      Vlad Zahorodnii authored
      Since we don't guarantee SC and BC in KWaylandServer, we can drop
      SurfaceInterface::inputIsInfitine().
      832f5bdd
    • Vlad Zahorodnii's avatar
      Introduce surface-to-buffer and buffer-to-surface matrices · 4d210a94
      Vlad Zahorodnii authored
      The compositor needs to monitor changes in the mapping between the
      surface local coordinates and the buffer coordinates because texture
      coordinates correspond to the latter. One way to do it is to monitor
      things such as the surface size, the buffer size, the buffer scale,
      etc. The main problem with doing so is that there are so many factors
      that contribute to how mapping between the surface local coordinate
      space and the buffer coordinate space is performed.
      
      In order to provide a generic way for monitoring changes in the mapping
      between the surface local coordinate space and the buffer coordinate
      space, this patch introduces two new matrices. The first one specifies
      how the surface-local coordinates are mapped to buffer coordinates, and
      the other one specifies how to map the buffer coordinates to surface
      local coordinates.
      
      With the new two matrices, the compositor has a generic way to get
      notified when it has to re-compute texture coordinates.
      4d210a94
  7. 02 Jun, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Add support for the wp_viewporter protocol · b9381012
      Vlad Zahorodnii authored
      The wp_viewporter compositor extension allows clients to crop and scale
      their surface. It can be useful for applications such as video players
      because it may potentially reduce their power usage.
      b9381012
  8. 01 Jun, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Add methods for converting buffer and surface coordinates · 5041e02f
      Vlad Zahorodnii authored
      Unfortunately, in order to map a point from the surface-local coordinate
      space to the buffer pixel coordinate space, one cannot divide the point
      by the scale factor since the buffer might be rotated or flipped.
      
      This change introduces a couple of helper methods for converting points,
      regions, and rectangles from the surface-local coordinates to the buffer
      pixel coordinates and vice versa.
      5041e02f
  9. 26 May, 2020 1 commit
  10. 04 May, 2020 1 commit
  11. 29 Apr, 2020 1 commit
  12. 22 Apr, 2020 1 commit
  13. 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
  14. 16 Mar, 2020 1 commit
  15. 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
  16. 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
  17. 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
  18. 06 Feb, 2019 1 commit
    • Roman Gilg's avatar
      [server] Add surface data proxy mechanism · 0b33f078
      Roman Gilg authored
      Summary:
      Allows a compositor to set a proxy surface to handle drag and drop
      operations place of the actual surface the drag originated from.
      
      One proxy surface can handle multiple origin surfaces at the same time. These
      need to get registered once. The active remote surface gets set when a pointer
      button is pressed on the surface.
      
      Test Plan: Manually with KWin's Xwayland DnD patches.
      
      Reviewers: #kwin
      
      Subscribers: davidedmundson, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D15421
      0b33f078
  19. 24 Oct, 2018 1 commit
    • Roman Gilg's avatar
      [server] Respect input region of sub-surfaces on pointer surface focus · 24bdc067
      Roman Gilg authored
      Summary:
      KWayland takes always the top-most child surface at a given position for its
      pointer input. But if a sub-surface sets its input region, it should not select
      this one when the position is out of its input region, but rather try the
      surface below.
      
      Test Plan:
      My testing was only on my Xwayland branch. Supposed to also fix a problem
      with Firefox native Wayland port.
      
      Reviewers: #frameworks, graesslin, davidedmundson
      
      Reviewed By: davidedmundson
      
      Subscribers: davidedmundson, zzag, kde-frameworks-devel, graesslin, plasma-devel
      
      Tags: #frameworks, #plasma_on_wayland
      
      Differential Revision: https://phabricator.kde.org/D7038
      24bdc067
  20. 16 Nov, 2017 1 commit
    • Martin Flöser's avatar
      Add support for zwp_idle_inhibit_manager_v1 · 9520c2f2
      Martin Flöser authored
      Summary:
      This protocol allows to indicate that a wl_surface should inhibit idle
      actions such as DPMS, screen locking if the surface is visible.
      
      The protocol is quite simple: it just creates an IdleInhibitor for a
      Surface. If such an IdleInhibitor exists the Surface is considered to
      inhibit idle.
      
      On the server side it is also exposed like that through the API. The
      IdleInhibitorInterface is private to the library and only
      SurfaceInterface is extended to expose whether it currently inhibits
      idle.
      
      CCBUG: 385956
      
      Test Plan: New test case added
      
      Reviewers: #frameworks, #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel
      
      Tags: #plasma_on_wayland, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D8396
      9520c2f2
  21. 26 May, 2017 1 commit
  22. 24 Nov, 2016 1 commit
    • Martin Flöser's avatar
      Implementation of PointerConstraints protcol · a6825301
      Martin Flöser authored
      Summary:
      The pointer constraints protocol is an unstable protocol and thus
      the implementation follows the semantics of unstable protocols.
      
      The protocol allows to create a constraint on the pointer - either a
      lock or a confinement on a surface. Those are not activated at once, but
      when the compositor actively grants it.
      
      During lock no further pointer motion is emitted, during confinement the
      pointer is kept in a certain area.
      
      This implements T4451.
      
      Reviewers: #plasma_on_wayland
      
      Subscribers: plasma-devel
      
      Tags: #plasma_on_wayland
      
      Differential Revision: https://phabricator.kde.org/D3466
      a6825301
  23. 16 Nov, 2016 1 commit
  24. 13 Sep, 2016 1 commit
    • Martin Flöser's avatar
      Add support for Surface enter/leave events · 4f9dae46
      Martin Flöser authored
      Summary:
      This change implements support for the wl_surface events enter and
      leave. Those events are emitted whenever a surface becomes visible on
      an output by e.g. mapping the surface, moving or resizing it. Similar
      the leave is sent whenever the surface is no longer on an output.
      
      The server side is not yet fully complete yet. It also needs to emit
      when the client binds the output another time and needs to send a
      leave before destroying the output.
      
      Reviewers: #plasma_on_wayland
      
      Subscribers: plasma-devel
      
      Tags: #plasma_on_wayland
      
      Differential Revision: https://phabricator.kde.org/D2528
      4f9dae46
  25. 27 Apr, 2016 1 commit
  26. 05 Apr, 2016 1 commit
  27. 04 Apr, 2016 1 commit
    • Martin Flöser's avatar
      [server] Add damage tracking feature to SurfaceInterface · 506bf3a3
      Martin Flöser authored
      Summary:
      This change introduces a damage tracking feature in SurfaceInterface.
      So far the SurfaceInterface only exposes the damage compared to the
      last attached buffer. But this is not always usefull for the user of
      the library. E.g. if:
      * server renders
      * client damages buffer and commits
      * client damages buffer and commits
      * server wants render
      
      In this situation the last damage information is not helpful to the
      user of the library. It would need the combined damage information over
      all attached buffers.
      
      The new API combines the damage of the two commits in the example above.
      The user of the library can then call resetTrackedDamage once it
      processed the current damage (e.g. by updating the OpenGL texture).
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Projects: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1281
      506bf3a3
  28. 29 Mar, 2016 1 commit
    • Martin Flöser's avatar
      [server] Add a convenient method to check whether a Surface is mapped · e4fa3d53
      Martin Flöser authored
      Summary:
      In a SubSurface tree a Surface is only considered mapped if the Surface
      has a buffer applied and the parent Surface is mapped.
      
      The added method implements this check. It's useful for the compositor
      to easily check this condition as it allows to easily figure out whether
      a SubSurface needs to be rendered and it's also useful for implementing
      the input handling as a not mapped sub-surface should not get any input
      events.
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Projects: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1247
      e4fa3d53
  29. 23 Mar, 2016 1 commit
    • Martin Flöser's avatar
      [server] Add a subSurfaceTreeChanged signal to SurfaceInterface · 0ed3c438
      Martin Flöser authored
      The idea behind this signal is to notify whenever the tree of sub
      surfaces changes in a way that a repaint of the Surface is required.
      Possible situations are:
      * surface damaged
      * surface unmapped
      * subsurface added/removed
      * subsurface moved (position changed)
      * subsurface stacking changed
      
      Ideally it would be possible to provide the actual area which needs
      repainting, but due to the possible complexity of the tree, synced
      and desynced changes this doesn't look worth the effort. A user of
      the signal might trigger too many repaints with it, but if it really
      wants to be only notified about the actual changes, it can just track
      the individual sub-surfaces.
      0ed3c438
  30. 15 Mar, 2016 1 commit
  31. 16 Sep, 2015 1 commit
  32. 10 Sep, 2015 1 commit
  33. 09 Sep, 2015 1 commit
    • Marco Martin's avatar
      Interface for a Slide effect · 27103c71
      Marco Martin authored
      a kwayland interface plus autotests for
      the slide KWin effect, marks a window the direction
      it wants to slide from and the offset from the screen edge
      27103c71
  34. 03 Sep, 2015 1 commit
  35. 02 Sep, 2015 1 commit
    • Marco Martin's avatar
      Blur protocol in KWayland · 7207c4ed
      Marco Martin authored
      a protocol to activate the blur behind windows and to
      optionally set a sub region of the window where to apply
      the blur to, in case the window is shaped
      REVIEW:125015
      7207c4ed
  36. 15 Jul, 2015 1 commit
    • Martin Flöser's avatar
      Add a Shadow protocol · 6922d518
      Martin Flöser authored
      The shadow protocol is inspired by the KWin's X11 protocol and the
      DecorationShadow in KDecoration2.
      
      A shadow is attached to a surface (after a commit on surface) and
      consists of several image parts (represented through a buffer):
      * top-left
      * top
      * top-right
      * right
      * bottom-right
      * bottom
      * bottom-left
      * left
      
      In addition there is an offset on each side.
      
      For more information see also the X11 protocol described at [1].
      
      Note: the protocol is currently missing documentation and changing
      the shadow is not yet properly delegated to the server API.
      
      [1] https://community.kde.org/KWin/Shadow
      6922d518
  37. 02 Apr, 2015 1 commit
  38. 03 Mar, 2015 1 commit