1. 29 Mar, 2021 2 commits
    • Simon Ser's avatar
      xwayland: require xcb-icccm · de5347d0
      Simon Ser authored and Kenny Levinsen's avatar Kenny Levinsen committed
      This dependency is already required by many other widely used X11
      programs, such as i3, Qt, and other XWMs. So it should be available
      on most systems.
      
      X11 support can be pretty broken without xcb-icccm, with focus issues
      for instance. Let's just remove this --please-break-my-desktop footgun
      option.
      de5347d0
    • Simon Ser's avatar
      xwayland: assume no WM_HINTS means window wants input · 96aa18ae
      Simon Ser authored and Kenny Levinsen's avatar Kenny Levinsen committed
      Some X11 clients (e.g. Chromium, sxiv) don't set WM_HINTS. The spec
      says:
      
      > Window managers are free to assume convenient values for all fields of the
      > WM_HINTS property if a window is mapped without one.
      
      Our wlr_xwayland_icccm_input_model function assumes missing WM_HINTS
      means the window doesn't want input, but this is incorrect. Assume the
      window wants input unless it explicitly opts-out by setting WM_HINTS.
      
      Closes: https://github.com/swaywm/sway/issues/6107
      96aa18ae
  2. 27 Mar, 2021 1 commit
    • Simon Ser's avatar
      render/egl, backend/wayland: add workaround for split render/display setups · b89bcffe
      Simon Ser authored
      Split render/display setups have two separate devices: one display-only
      with a primary node, and one render-only with a render node. However
      in these cases the EGL implementation and the Wayland compositor will
      advertise the display device instead of the render device [1]. The EGL
      implementation will magically open the render device when the display
      device is passed in.
      
      So just pass the display device as if it were a render device. Maybe in
      the future Mesa will advertise the render device instead and we'll be
      able to remove this workaround.
      
      [1]: mesa/mesa#4178
      b89bcffe
  3. 26 Mar, 2021 1 commit
  4. 25 Mar, 2021 9 commits
  5. 23 Mar, 2021 1 commit
    • Simon Ser's avatar
      linux-dmabuf-v1: always advertise support for implicit modifiers · d9cae04f
      Simon Ser authored
      Some clients (like Xwayland) will fallback to wl_drm if the compositor
      doesn't explicitly advertise support for implicit modifiers, even when
      the compositor supports explicit modifiers. This behavior sounds correct
      from a protocol point of view.
      d9cae04f
  6. 22 Mar, 2021 2 commits
  7. 16 Mar, 2021 2 commits
    • Simon Ser's avatar
      Fix buffer blit matrices · c740fccc
      Simon Ser authored
      There was a missing wlr_matrix_scale call, so we ended up with black
      frames.
      
      Closes: https://github.com/swaywm/wlroots/issues/2780
      c740fccc
    • Simon Ser's avatar
      screencopy: stop using wlr_renderer_blit_dmabuf · 7720dde7
      Simon Ser authored
      The original motivation is the following crash:
      
          #0  0x00007f0ddeddeef5 in raise () at /usr/lib/libc.so.6
          #1  0x00007f0ddedc8862 in abort () at /usr/lib/libc.so.6
          #2  0x00007f0ddedc8747 in _nl_load_domain.cold () at /usr/lib/libc.so.6
          #3  0x00007f0ddedd7646 in  () at /usr/lib/libc.so.6
          #4  0x00007f0de033f8de in gles2_get_renderer_in_context (wlr_renderer=0x612000003640) at ../subprojects/wlroots/render/gles2/renderer.c:38
          #5  0x00007f0de0341675 in gles2_begin (wlr_renderer=0x612000003640, width=3840, height=2160) at ../subprojects/wlroots/render/gles2/renderer.c:186
          #6  0x00007f0de033b100 in wlr_renderer_begin (r=0x612000003640, width=3840, height=2160) at ../subprojects/wlroots/render/wlr_renderer.c:56
          #7  0x00007f0de03466ed in gles2_blit_dmabuf (wlr_renderer=0x612000003640, dst_attr=0x60b000150148, src_attr=0x7fff9f9bfde0) at ../subprojects/wlroots/render/gles2/renderer.c:591
          #8  0x00007f0de033d717 in wlr_renderer_blit_dmabuf (r=0x612000003640, dst=0x60b000150148, src=0x7fff9f9bfde0) at ../subprojects/wlroots/render/wlr_renderer.c:210
          #9  0x00007f0de04cbc3b in frame_handle_output_commit (listener=0x611000220bc8, data=0x7fff9f9c0050) at ../subprojects/wlroots/types/wlr_screencopy_v1.c:303
      
      The GLES2 renderer assumes it'll have a wlr_buffer to render to.
      
      Instead of accomodating for the edge-case of rendering without a
      wlr_buffer, drop wlr_renderer_blit_dmabuf calls and instead use
      wlr_renderer_bind_buffer just like the rest of the wlr_renderer users.
      wlr_renderer_blit_dmabuf is now unused in wlroots.
      
      The upside is that the new blit_dmabuf function in screencopy is
      renderer-agnostic.
      7720dde7
  8. 15 Mar, 2021 3 commits
  9. 11 Mar, 2021 1 commit
  10. 10 Mar, 2021 1 commit
    • Simon Zeni's avatar
      output: improve transform matrix calculation · 9601a2ab
      Simon Zeni authored and Simon Ser's avatar Simon Ser committed
      Compute only the transform matrix in the output. The projection matrix
      will be calculated inside the gles2 renderer when we start rendering.
      
      The goal is to help the pixman rendering process.
      9601a2ab
  11. 09 Mar, 2021 2 commits
  12. 08 Mar, 2021 2 commits
  13. 07 Mar, 2021 1 commit
  14. 05 Mar, 2021 1 commit
  15. 03 Mar, 2021 3 commits
    • Simon Ser's avatar
      xwayland: use -listenfd if available · e6f6e1ad
      Simon Ser authored
      Xwayland's -listen option was deprecated in [1] in favor of -listenfd.
      
      [1]: xorg/xserver!593
      e6f6e1ad
    • Simon Ser's avatar
      xwayland: check executable exists on init · eec2e1d3
      Simon Ser authored
      Instead of walking PATH like a previous proposal [1], this one
      checks that the Xwayland path specified in the pkg-config file
      exists.
      
      I think this is a reasonable compromise:
      
      - Users that don't have Xwayland installed system-wide won't get
        a bogus DISPLAY env variable set up.
      - Users that have WLR_XWAYLAND set won't be affected by this check.
      - Users that have Xwayland installed system-wide and a different
        Xwayland in their PATH still get their custom Xwayland.
      - Users that don't have Xwayland installed system-wide but have it
        somewhere else in PATH are left out. But this is pretty niche,
        and they can just set WLR_XWAYLAND.
      
      [1]: https://github.com/swaywm/wlroots/pull/2314
      eec2e1d3
    • Simon Ser's avatar
      xwayland: add dependency on xwayland · 3504bb58
      Simon Ser authored
      Check that the pkg-config file is available. This will be required
      in the future to check whether xwayland supports features such as
      -listenfd, -initfd or -verbose.
      
      If there's no pkg-config file, check that the Xwayland executable
      is available.
      
      This effectively makes our relationship with xwayland closer to what
      a dynamic library is: checked at build-time, but can be overridden
      at run-time.
      3504bb58
  16. 28 Feb, 2021 1 commit
  17. 23 Feb, 2021 7 commits