Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest version of linux_dmabuf protocol #2

Closed
wants to merge 265 commits into from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Jul 28, 2021

  1. Configuration menu
    Copy the full SHA
    9b99570 View commit details
    Browse the repository at this point in the history
  2. backend/drm: drop get_renderer implementation

    We can now just rely on the common code for this.
    emersion committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    c74dc45 View commit details
    Browse the repository at this point in the history
  3. backend/drm: stop initializing renderer for parent backend

    Unless we're dealing with a multi-GPU setup and the backend being
    initialized is secondary, we don't need a renderer nor an allocator.
    Stop initializing these.
    emersion committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    c55f70c View commit details
    Browse the repository at this point in the history
  4. backend/drm: fix wrong type for get_cursor_format return values

    These are bools but should be pointers.
    emersion authored and bl4ckb0ne committed Jul 28, 2021
    Configuration menu
    Copy the full SHA
    55ac7e3 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2021

  1. backend/noop: drop attach_render/rollback_render

    We no longer require wlr_output_impl.{attach,rollback}_render to
    be populated.
    emersion authored and bl4ckb0ne committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    d17a009 View commit details
    Browse the repository at this point in the history
  2. output: drop wlr_output_impl.{attach,rollback}_render

    No backend uses these anymore.
    emersion authored and bl4ckb0ne committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    4ddde1a View commit details
    Browse the repository at this point in the history
  3. output-damage: stop using enum wlr_output_state_buffer_type

    This enum will get dropped in the next commit.
    emersion authored and bl4ckb0ne committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    f211bc9 View commit details
    Browse the repository at this point in the history
  4. output: drop wlr_output_state.buffer_type

    This is now unconditionally set to WLR_OUTPUT_STATE_BUFFER_SCANOUT.
    emersion authored and bl4ckb0ne committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    3132c0a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6973361 View commit details
    Browse the repository at this point in the history
  6. render/gles2: add support for some 24 and 16-bit formats

    On little-endian, we can enable pixel formats which don't use
    gl_type = GL_UNSIGNED_BYTE. See [1].
    
    [1]: https://afrantzis.com/pixel-format-guide/
    emersion authored and bl4ckb0ne committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    f769603 View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2021

  1. Configuration menu
    Copy the full SHA
    4dc52bc View commit details
    Browse the repository at this point in the history
  2. render/gles2: hide shm formats without GL support

    This change introduces a new function to check whether the renderer
    has the needed GL extensions to read a given pixel format.
    mstoeckl authored and emersion committed Jul 30, 2021
    Configuration menu
    Copy the full SHA
    44e8451 View commit details
    Browse the repository at this point in the history
  3. render/gles2: add a few 10-bit and FP16 formats

    The half-float formats depend on GL_OES_texture_half_float_linear,
    not just the GL_OES_texture_half_float extension, because the latter
    does not include support for linear magni/minification filters.
    
    The new 2101010 and 16161616F formats are only available on little-
    endian builds, since their gl_types are larger than a byte and thus
    endianness dependent.
    mstoeckl authored and emersion committed Jul 30, 2021
    Configuration menu
    Copy the full SHA
    f5df956 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2021

  1. viewporter: remove crop and scale state upon destruction

    According to the viewport protocol, upon wp_viewport::destroy():
    
    > The associated wl_surface's crop and scale state is removed.
    > The change is applied on the next wl_surface.commit.
    
    Therefore, wp_viewport_destroy(viewport) should remove all viewport state.
    
    Currently, wlroots does not remove the crop and scale state. Instead, a
    client must do:
    
        wl_fixed_t clear = wl_fixed_from_int(-1);
        wp_viewport_set_source(viewport, clear, clear, clear, clear);
        wp_viewport_set_destination(viewport, -1, -1);
        wp_viewport_destroy(viewport);
    
    This commit adds the necessary logic into viewport_destroy and makes
    wlroots comply with the protocol.
    quantum5 authored and emersion committed Aug 2, 2021
    Configuration menu
    Copy the full SHA
    456c6e2 View commit details
    Browse the repository at this point in the history
  2. surface: don't cache frame callback lists

    Kirill Primak authored and emersion committed Aug 2, 2021
    Configuration menu
    Copy the full SHA
    f12bacf View commit details
    Browse the repository at this point in the history
  3. backend/drm: preserve mode order from kernel

    The kernel orders the mode list from highest to lowest. Preserve
    this ordering in the wlr_output.modes list.
    emersion authored and bl4ckb0ne committed Aug 2, 2021
    Configuration menu
    Copy the full SHA
    923258b View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2021

  1. render/pixel_format: add more formats for Pixman

    These will be added to Pixman in the next commit.
    emersion authored and bl4ckb0ne committed Aug 3, 2021
    Configuration menu
    Copy the full SHA
    b913e64 View commit details
    Browse the repository at this point in the history
  2. render/pixman/pixel_format: add more formats

    Add a bunch of new formats for Pixman: a few missing 32-bit ones,
    some 16-bit and 32-bit formats as well.
    
    Mostly based on a Weston patch [1].
    
    [1]: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/664
    emersion authored and bl4ckb0ne committed Aug 3, 2021
    Configuration menu
    Copy the full SHA
    8a3cd28 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2021

  1. output: try skipping buffer allocation if the backend allows it

    When enabling an output, skip the empty buffer allocation if the
    backend accepts modesets without a buffer.
    
    This fixes mode-setting with the noop backend.
    emersion authored and bl4ckb0ne committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    df0e75b View commit details
    Browse the repository at this point in the history
  2. backend/drm: require buffer on modeset in drm_connector_test

    When testing a modeset, make sure the caller has also provided a
    buffer. This allows df0e75b ("output: try skipping buffer
    allocation if the backend allows it") to work as expected with the
    DRM backend.
    
    Closes: swaywm#3086
    emersion authored and kennylevinsen committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    1936e13 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2021

  1. Configuration menu
    Copy the full SHA
    ca0b19f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d48ffac View commit details
    Browse the repository at this point in the history
  3. seat: allow compositors to not load a keymap

    The protocol allows compositors to not send any keymap to Wayland
    clients. Handle a keymap-less keyboard correctly by sending
    WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP instead of erroring out in the
    mmap call.
    emersion authored and kennylevinsen committed Aug 6, 2021
    Configuration menu
    Copy the full SHA
    c27263c View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2021

  1. input/pointer: try harder to not send duplicate motion events

    wl_fixed_t is a 32-bit data type, but our doubles are 64-bit. This meant
    that two doubles that would map to the same wl_fixed_t could compare
    unequal, and send a duplicate motion event.
    
    Refs swaywm/sway#4632.
    Xyene authored and emersion committed Aug 7, 2021
    Configuration menu
    Copy the full SHA
    033c9ca View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2021

  1. ci: add smoke test

    Add a very basic smoke test which uses VKMS to fire up the DRM
    backend.
    emersion authored and kennylevinsen committed Aug 8, 2021
    Configuration menu
    Copy the full SHA
    88f65db View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2021

  1. backend/drm: add proper error handling to wlr_drm_backend_create

    Some listeners weren't removed and caused a use-after-free with
    e.g. vkms when used as a secondary GPU.
    emersion authored and kennylevinsen committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    eb0ce65 View commit details
    Browse the repository at this point in the history
  2. backend/drm: always perform a test commit in drm_connector_test

    This allows callers to use wlr_output_test to check whether a mode
    can be enabled, for instance.
    
    Closes: swaywm#2250
    emersion authored and kennylevinsen committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    604674d View commit details
    Browse the repository at this point in the history
  3. util: add wlr_addon

    Kirill Primak authored and emersion committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    a6a8085 View commit details
    Browse the repository at this point in the history
  4. wlr_outputs: add wlr_addon_set

    Kirill Primak authored and emersion committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    11f799e View commit details
    Browse the repository at this point in the history
  5. wlr_output_layout: use wlr_addons

    Kirill Primak authored and emersion committed Aug 10, 2021
    Configuration menu
    Copy the full SHA
    debd6c5 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2021

  1. util/addon: find both by owner and impl

    This allows to have multiple addons of different types with the same
    owner.
    Kirill Primak authored and emersion committed Aug 11, 2021
    Configuration menu
    Copy the full SHA
    111d4ea View commit details
    Browse the repository at this point in the history
  2. surface: kill wlr_surface.previous

    This wlr_surface_state field was a special case because we don't
    want to save the whole current state: for instance, the wlr_buffer
    must not be saved or else wouldn't get released soon enough.
    
    Let's just inline the state fields we need instead.
    emersion committed Aug 11, 2021
    Configuration menu
    Copy the full SHA
    3f9e4f7 View commit details
    Browse the repository at this point in the history
  3. surface: drop surface_state_copy

    This function was weird because it copied some fields but not all.
    emersion committed Aug 11, 2021
    Configuration menu
    Copy the full SHA
    20404ed View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2021

  1. buffer: add addon set

    This allows wlr_buffer users to extend it with tjeir own state.
    emersion committed Aug 12, 2021
    Configuration menu
    Copy the full SHA
    9396401 View commit details
    Browse the repository at this point in the history
  2. render/gles2: make wlr_gles2_buffer an addon

    Saves us from walking a list.
    emersion committed Aug 12, 2021
    Configuration menu
    Copy the full SHA
    ee1156b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ad7651a View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2021

  1. layer-shell: replace close() with destroy()

    The protocol specifies that all requests (aside from destroy) are
    ignored after the compositor sends the closed event. Therefore,
    destroying the wlroots object and rendering the resource inert
    when sending the closed event keeps things simpler for wlroots and
    compositors.
    ifreund authored and emersion committed Aug 14, 2021
    Configuration menu
    Copy the full SHA
    3364eec View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2021

  1. input/tablet: fix wl_array_for_each usage on tablet proximity

    Looks like this instance was missed in
    e035f2b.
    
    Fixes swaywm#3110.
    Xyene authored and kennylevinsen committed Aug 15, 2021
    Configuration menu
    Copy the full SHA
    0c19a28 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2021

  1. xwayland: do not free cursor in handle_server_ready()

    If XWayland terminates for any reason, xwm_set_cursor() has to
    to be called again, so the cursor has to stick around.
    michelesr authored and emersion committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    cae7b98 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7544b7a View commit details
    Browse the repository at this point in the history
  3. backend/drm: return true on test if no crtc

    This should fix the following backtrace, seen on my desktop with one
    output disabled:
    
      #0  atomic_crtc_commit (conn=0x270f5c0, state=0x270f6d0, flags=0, test_only=<optimized out>) at ../backend/drm/atomic.c:178
              drm = 0x1ae9c10
              output = 0x270f5c0
              crtc = 0x0
              modeset = false
              active = false
              mode_id = 43989232
              gamma_lut = 0
              prev_vrr_enabled = <optimized out>
              vrr_enabled = <optimized out>
              atom = {req = 0x270f5c0, failed = 48}
              ok = <optimized out>
      emersion#1  0x00007f1104f33128 in drm_crtc_commit (conn=conn@entry=0x270f5c0, state=state@entry=0x270f6d0, flags=flags@entry=0, test_only=test_only@entry=true) at ../backend/drm/drm.c:339
              __PRETTY_FUNCTION__ = "drm_crtc_commit"
              drm = <optimized out>
              crtc = 0x0
              ok = <optimized out>
      emersion#2  0x00007f1104f34e6c in drm_connector_test (output=output@entry=0x270f5c0) at ../backend/drm/drm.c:488
              conn = 0x270f5c0
              unsupported = <optimized out>
      swaywm#3  0x00007f1104f35424 in drm_connector_commit (output=0x270f5c0) at ../backend/drm/drm.c:578
              conn = 0x270f5c0
      swaywm#4  0x00007f1104f600b7 in wlr_output_commit (output=output@entry=0x270f5c0) at ../types/wlr_output.c:837
              now = {tv_sec = 7732, tv_nsec = 623813006}
              pre_event = {output = 0x270f5c0, when = 0x7ffecc1be570}
              back_buffer = 0x0
              scale_updated = <optimized out>
              geometry_updated = <optimized out>
              committed = <optimized out>
              event = {output = 0x0, committed = 4401048, when = 0x29f38f0}
      swaywm#5  0x0000000000433047 in apply_output_config (oc=oc@entry=0x29f38f0, output=output@entry=0x2710720) at ../sway/config/output.c:431
              wlr_output = 0x270f5c0
              output_box = <optimized out>
      swaywm#6  0x0000000000433aaf in apply_output_config_to_outputs (oc=0x2308400) at ../sway/config/output.c:649
              current = 0x29f38f0
              name = <optimized out>
              wildcard = true
              id = "Dell Inc. DELL U2410 F525M9AK0MML\000\060\060\060ACD7\000\000\000\000\000\000\000\220\063\240\002\000\000\000\000L5C\000\000\000\000\000\377\377\377\377\000\000\000\000\377\377\377\377\000\000\000\000\377\377\377\377\000\000\000\000\377\377\377\377\000\000\000\000\355\240E\000\000\000\000\000\377\377\377\377\000\000\000\000@\206+\002\000\000\000\000`\260.\002\000\000\000"
              sway_output = 0x2710720
              tmp = 0x2242030
              seat = <optimized out>
      swaywm#7  0x000000000043df6b in cmd_output (argc=<optimized out>, argv=0x2a03390) at ../sway/commands/output.c:108
              error = <optimized out>
              output = <optimized out>
              background = false
      swaywm#8  0x0000000000410304 in execute_command (_exec=_exec@entry=0x2975d20 "output * dpms off", seat=0x22a3280, seat@entry=0x0, con=con@entry=0x0) at ../sway/commands.c:291
              res = <optimized out>
              argc = 4
              argv = 0x2a03370
              handler = 0x479230 <handlers+560>
              cmd = <optimized out>
              matched_delim = 0 '\000'
              containers = 0x0
              using_criteria = false
              __PRETTY_FUNCTION__ = "execute_command"
              exec = 0x28f63c0 "output * dpms off"
              head = 0x0
              res_list = 0x2a2e9d0
      swaywm#9  0x0000000000418b65 in ipc_client_handle_command (client=client@entry=0x2a6ac80, payload_length=<optimized out>, payload_type=IPC_COMMAND) at ../sway/ipc-server.c:645
              line = <optimized out>
              res_list = <optimized out>
              json = <optimized out>
              length = <optimized out>
              __PRETTY_FUNCTION__ = "ipc_client_handle_command"
              buf = 0x2975d20 "output * dpms off"
      swaywm#10 0x000000000041964c in ipc_client_handle_readable (client_fd=<optimized out>, mask=<optimized out>, data=0x2a6ac80) at ../sway/ipc-server.c:267
              pending_length = <optimized out>
              pending_type = <optimized out>
              client = 0x2a6ac80
              read_available = 31
              buf = "i3-ipc\021\000\000\000\000\000\000"
              received = 14
      swaywm#11 0x00007f1104fc3492 in wl_event_loop_dispatch () from /nix/store/ridk7k2ka6dbk4ly7qqjgmc523s4fj89-wayland-1.19.0/lib/libwayland-server.so.0
      No symbol table info available.
      swaywm#12 0x00007f1104fc1135 in wl_display_run () from /nix/store/ridk7k2ka6dbk4ly7qqjgmc523s4fj89-wayland-1.19.0/lib/libwayland-server.so.0
      No symbol table info available.
      swaywm#13 0x000000000041ac10 in server_run (server=server@entry=0x47b0c0 <server>) at ../sway/server.c:261
      No locals.
      swaywm#14 0x000000000041a3fc in main (argc=<optimized out>, argv=0x7ffecc1bec68) at ../sway/main.c:395
              verbose = 0
              debug = 0
              validate = 0
              allow_unsupported_gpu = 0
              long_options = {{name = 0x45b516 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x45ee69 "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x45b51b "validate", has_arg = 0, flag = 0x0, val = 67}, {
                  name = 0x45b524 "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x45b3ac "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x45a55c "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x45b52a "get-socketpath",
                  has_arg = 0, flag = 0x0, val = 112}, {name = 0x45b539 "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {name = 0x45b549 "my-next-gpu-wont-be-nvidia", has_arg = 0, flag = 0x0, val = 117}, {name = 0x0, has_arg = 0,
                  flag = 0x0, val = 0}}
              config_path = 0x0
              usage = 0x45b830 "Usage: sway [options] [command]\n\n  -h, --help", ' ' <repeats 13 times>, "Show help message and quit.\n  -c, --config <config>  Specify a config file.\n  -C, --validate         Check the validity of the config file, th"...
              c = <optimized out>
    
    where the second output is not enabled:
    
      (gdb) frame 4
      swaywm#4  0x00007f1104f600b7 in wlr_output_commit (output=output@entry=0x270f5c0) at ../types/wlr_output.c:837
      837	in ../types/wlr_output.c
      (gdb) p output->enabled
      $3 = false
      (gdb)
    
    The culprit being that since 604674d we
    always try to perform a commit, even on a disabled output.
    Emantor authored and emersion committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    59b292b View commit details
    Browse the repository at this point in the history
  4. output: check output enabled before sending frame

    Similar to commit 8575766 ("backend/drm: Check if output is enabled
    before sending frame event"), check if the output is still enabled
    before sending the frame event. This fixes the bug not only for the DRM
    backend, but for wayland and X11 as well.
    Emantor authored and emersion committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    aa78c50 View commit details
    Browse the repository at this point in the history
  5. Revert "backend/drm: Check if output is enabled before sending frame …

    …event"
    
    This reverts commit 8575766.
    
    We now check if the output is enabled within wlr_output_send_frame, no
    need to handle this explicitly in the DRM backend. This also fixes a
    race which was introduced with this commit: if we schedule the flip,
    disable and commit the output before the flip happens,
    output.frame_pending will not be reset to false. We than always fail to
    enable the output subsequently:
    
          00:07:13.276 [INFO] [sway/commands.c:257] Handling command 'output DP-2 enable'
          00:07:13.276 [DEBUG] [sway/commands.c:428] Subcommand: enable
          00:07:13.276 [DEBUG] [sway/config/output.c:204] Merging on top of existing output config
          00:07:13.276 [DEBUG] [sway/config/output.c:227] Config stored for output DP-2 (enabled: 1) (-1x-1@-1.000000Hz position 0,0 scale -1.000000 subpixel unknown transform -1) (bg /home/phoenix/Pictures/Wallpapers/mine/oper.jpg fill) (dpms 1) (max render time: -1)
          00:07:13.276 [DEBUG] [sway/config/output.c:351] Turning on output DP-2
          00:07:13.276 [DEBUG] [sway/config/output.c:360] Set preferred mode
          00:07:13.276 [DEBUG] [wlr] [backend/drm/drm.c:465] connector DP-2: Can't enable an output without a buffer
          00:07:13.276 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
          00:07:13.277 [DEBUG] [sway/config/output.c:329] Output DPI: 162.560000x161.364706
          00:07:13.277 [DEBUG] [sway/config/output.c:400] Auto-detected output scale: 1.000000
          00:07:13.277 [DEBUG] [sway/config/output.c:430] Committing output DP-2
          00:07:13.277 [DEBUG] [wlr] [types/wlr_output.c:729] Tried to commit a buffer while a frame is pending
    
    since the basic_output_test will always fail.
    Reset frame_pending to false even if the output has been disabled in the
    meantime.
    
    Fixes swaywm#3109
    Emantor authored and emersion committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    cdd9a60 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2021

  1. surface: fix place_below handling

    If a subsurface is being placed below a subsurface right above it, this
    should be a noop. However, `node` pointed to the subsurface that was
    moved, which resulted in `subsurface->parent_pending_link` being
    inserted into itself, breaking parent's pending subsurface list.
    
    This commit separates finding the requested node and getting it's `prev`
    field, fixing the issue.
    Kirill Primak authored and emersion committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    1094057 View commit details
    Browse the repository at this point in the history
  2. backend/drm: add support for FB_DAMAGE_CLIPS

    This allows the kernel to access our buffer damage. Some drivers
    can take advantage of this, e.g. for PSR2 panels (Panel Self
    Refresh) or for transfer over USB.
    
    Closes: swaywm#1267
    emersion committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    46c42e5 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2021

  1. Configuration menu
    Copy the full SHA
    18c2dce View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2021

  1. backend/drm: try to allocate crtc for formats

    To retrieve the formats, an allocated crtc is required. If there is no
    currently no crtc available, try to allocate it. This reproducable by
    having a disabled output and going through a suspend cycle with amdgpu.
    On start CRTCs look like this:
    
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1099] Reallocating CRTCs
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1110] State before reallocation:
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1116]   'DP-1' crtc=0 state=1 desired_enabled=1
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1116]   'DP-2' crtc=1 state=1 desired_enabled=1
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1116]   'HDMI-A-1' crtc=-1 state=0 desired_enabled=0
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1116]   'HDMI-A-2' crtc=-1 state=0 desired_enabled=0
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1116]   'DVI-D-1' crtc=-1 state=0 desired_enabled=0
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1167] State after reallocation:
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1174]   'DP-1' crtc=0 state=1 desired_enabled=1
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1174]   'DP-2' crtc=1 state=1 desired_enabled=1
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1174]   'HDMI-A-1' crtc=-1 state=0 desired_enabled=0
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1174]   'HDMI-A-2' crtc=-1 state=0 desired_enabled=0
      00:00:00.588 [DEBUG] [wlr] [backend/drm/drm.c:1174]   'DVI-D-1' crtc=-1 state=0 desired_enabled=0
    
    where DP-1 is than disabled. After suspend/resume, allocation turns into:
    
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1099] Reallocating CRTCs
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1110] State before reallocation:
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1116]   'DP-1' crtc=-1 state=1 desired_enabled=0
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1116]   'DP-2' crtc=1 state=3 desired_enabled=1
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1116]   'HDMI-A-1' crtc=-1 state=0 desired_enabled=0
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1116]   'HDMI-A-2' crtc=-1 state=0 desired_enabled=0
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1116]   'DVI-D-1' crtc=-1 state=0 desired_enabled=0
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1167] State after reallocation:
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1174]   'DP-1' crtc=-1 state=1 desired_enabled=0
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1174]   'DP-2' crtc=1 state=3 desired_enabled=1
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1174]   'HDMI-A-1' crtc=-1 state=0 desired_enabled=0
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1174]   'HDMI-A-2' crtc=-1 state=0 desired_enabled=0
      00:30:22.680 [DEBUG] [wlr] [backend/drm/drm.c:1174]   'DVI-D-1' crtc=-1 state=0 desired_enabled=0
    
    where the crtc for DP-1 is now NULL. Trying to enable the output results
    in:
    
      10:43:36.906 [DEBUG] [sway/config/output.c:351] Turning on output DP-1
      10:43:36.906 [DEBUG] [sway/config/output.c:360] Set preferred mode
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [sway/config/output.c:366] Preferred mode rejected, falling back to another mode
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.906 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.906 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.906 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [DEBUG] [sway/config/output.c:400] Auto-detected output scale: 1.000000
      10:43:36.907 [DEBUG] [sway/config/output.c:430] Committing output DP-1
      10:43:36.907 [DEBUG] [wlr] [backend/drm/drm.c:464] connector DP-1: Can't enable an output without a buffer
      10:43:36.907 [DEBUG] [wlr] [types/wlr_output.c:689] Attaching empty buffer to output for modeset
      10:43:36.907 [ERROR] [wlr] [types/wlr_output.c:512] Failed to get primary display formats
      10:43:36.907 [ERROR] [sway/config/output.c:435] Failed to commit output DP-1
    
    where the primary format can't be queried since there is no crtc
    allocated for the connector. Allocating the connector inside
    drm_connector_get_primary_formats() fixes this issue. This is possible
    since the only user of get_primary_formats() is the swapchain allocation
    function, which is only called on output enable. Do the same thing for
    the cursor formats in case the user queries them before the output is
    enabled.
    Emantor authored and emersion committed Aug 20, 2021
    Configuration menu
    Copy the full SHA
    9b7803a View commit details
    Browse the repository at this point in the history
  2. xwayland: Allow to retrieve _NET_STARTUP_ID

    This is use for startup notifications per startup-notifiation spec
    
    https://specifications.freedesktop.org/startup-notification-spec/startup-notification-latest.txt
    agx authored and emersion committed Aug 20, 2021
    Configuration menu
    Copy the full SHA
    de1522a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f2f3df9 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2021

  1. util/box: introduce wlr_fbox_transform()

    A floating-point version of wlr_box_transform().
    Kirill Primak authored and emersion committed Aug 24, 2021
    Configuration menu
    Copy the full SHA
    664307f View commit details
    Browse the repository at this point in the history
  2. surface: fix wlr_surface_get_buffer_source_box()

    Kirill Primak authored and emersion committed Aug 24, 2021
    Configuration menu
    Copy the full SHA
    72a156b View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2021

  1. backend/drm: generate CVT reduced modes

    The Coordinated Video Timings (CVT) spec [1] defines two types of
    timings: the "CVT standard CRT" timings and the "CVT reduced blanking"
    timings (see section 3.6).
    
    The standard CRT timings include pauses in the video stream to allow
    CRT displays to reposition their electron beam at the end of each
    horizontal scan line [2]. While this was desirable a few decades ago,
    nowadays we can just generate a CVT reduced blanking timing by default.
    wlroots users can still set full custom DRM modes via
    wlr_drm_connector_add_mode.
    
    [1]: https://glenwing.github.io/docs/VESA-CVT-1.2.pdf
    [2]: https://en.wikipedia.org/wiki/Coordinated_Video_Timings#Reduced_blanking
    emersion committed Aug 25, 2021
    Configuration menu
    Copy the full SHA
    65c0ab0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b37731c View commit details
    Browse the repository at this point in the history
  3. Move allocator stuff into new directory

    Add render/allocator/ and include/render/allocator/ to hold
    everything allocator-related.
    emersion authored and bl4ckb0ne committed Aug 25, 2021
    Configuration menu
    Copy the full SHA
    3ce2ea9 View commit details
    Browse the repository at this point in the history
  4. render/egl: reopen DRM node for GBM

    This will be necessary for the next patch, to avoid messing up BO
    handles shared between the GL implementation and the DRM backend.
    emersion authored and bl4ckb0ne committed Aug 25, 2021
    Configuration menu
    Copy the full SHA
    749b3c0 View commit details
    Browse the repository at this point in the history
  5. backend/drm: introduce wlr_drm_bo_handle_table

    Using GBM to import DRM dumb buffers tends to not work well. By
    using GBM we're calling some driver-specific functions in Mesa.
    These functions check whether Mesa can work with the buffer.
    Sometimes Mesa has requirements which differ from DRM dumb buffers
    and the GBM import will fail (e.g. on amdgpu).
    
    Instead, drop GBM and use drmPrimeFDToHandle directly. But there's
    a twist: BO handles are not ref'counted by the kernel and need to
    be ref'counted in user-space [1]. libdrm usually performs this
    bookkeeping and is used under-the-hood by Mesa.
    
    We can't re-use libdrm for this task without using driver-specific
    APIs. So let's just re-implement the ref'counting logic in wlroots.
    The wlroots implementation is inspired from amdgpu's in libdrm [2].
    
    Closes: swaywm#2916
    
    [1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110
    [2]: https://gitlab.freedesktop.org/mesa/drm/-/blob/1a4c0ec9aea13211997f982715fe5ffcf19dd067/amdgpu/handle_table.c
    emersion authored and bl4ckb0ne committed Aug 25, 2021
    Configuration menu
    Copy the full SHA
    5dfaf5e View commit details
    Browse the repository at this point in the history
  6. subsurface: unlock surface on destroy

    Kirill Primak authored and emersion committed Aug 25, 2021
    Configuration menu
    Copy the full SHA
    5f64559 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2021

  1. Introduce new scene-graph API

    A new wlr_scene API has been added, following the design ideas from [1].
    The new API contains the minimal set of features required to make the
    API useful. The goal is to design a solid fundation and add more
    features in the future.
    
    [1]: swaywm#1826 (comment)
    emersion committed Aug 26, 2021
    Configuration menu
    Copy the full SHA
    c7d489b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c41bd32 View commit details
    Browse the repository at this point in the history
  3. scene: add wlr_scene_node_toggle

    This allows compositors to easily enable or disable a scene-graph node.
    This can be used to show/hide a surface when the xdg_surface is
    mapped/unmapped.
    emersion committed Aug 26, 2021
    Configuration menu
    Copy the full SHA
    86e9309 View commit details
    Browse the repository at this point in the history
  4. scene: allow nodes to have arbitrary parents

    For instance, allow a surface node to be a child of another surface
    node. This allows easier xdg-popup handling in compositors.
    emersion committed Aug 26, 2021
    Configuration menu
    Copy the full SHA
    9795415 View commit details
    Browse the repository at this point in the history
  5. scene: add user data pointer to wlr_scene_node

    This allows compositors to attach arbitrary data to the scene-graph
    nodes.
    emersion committed Aug 26, 2021
    Configuration menu
    Copy the full SHA
    501b29d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e4d0ec9 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2021

  1. xwm: do not restack surfaces on activation

    Currently, upon activating a surface, wlroots restacks it on top of all
    others.
    
    This may not necessarily be correct from the calling compositor's point
    of view, where having focus may not imply being top-of-stack (e.g.,
    focusing a window under an always-on-top window).
    
    In Sway's case, this means that focused tiling windows will always be on
    top of floating windows, at least in the order communicated to X11 apps.
    This breaks drag-and-drop from a focused tiling X11 window to a floating
    X11 window which partially obscures the former.
    
    This is a breaking change; to retain the previous behavior, users that
    were calling
    
      wlr_xwayland_surface_activate(xsurface, true);
    
    should now be calling
    
      wlr_xwayland_surface_activate(xsurface, true);
      wlr_xwayland_surface_restack(xsurface, NULL, XCB_STACK_MODE_ABOVE);
    Xyene authored and emersion committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    bfc69de View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2021

  1. contributing: add new section about commit log

    This is shamelessly stolen from Weston [1].
    
    It's been a while we've transitioned away from merge commits and
    work-style commit history, so it'd be nice to mention this in the
    docs.
    
    [1]: https://gitlab.freedesktop.org/wayland/weston/-/blob/main/CONTRIBUTING.md#formatting-and-separating-commits
    emersion authored and bl4ckb0ne committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    2ddd8e8 View commit details
    Browse the repository at this point in the history
  2. contributing: use references for links

    This avoids cluttering the prose with URLs.
    emersion authored and bl4ckb0ne committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    ea800b7 View commit details
    Browse the repository at this point in the history
  3. contributing: clone wlroots fork with SSH

    HTTPS URLs aren't writable.
    emersion authored and bl4ckb0ne committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    1ad3cd7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b18c254 View commit details
    Browse the repository at this point in the history
  5. scene: add node reparent function

    If nodes are arranged in a tree rather than at a single level, then it
    makes sense that there should be a way to move them to a completely
    different parent in addition to moving up or down among siblings.
    djpohly authored and emersion committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    a1d462f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0f534e3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d5263be View commit details
    Browse the repository at this point in the history
  8. scene: stricter assertions on reparent

    For consistency with the rest of the scene-graph API, prevent detaching
    a subtree by giving NULL for the new parent, and don't allow ROOT nodes
    to be grafted into another tree.
    djpohly authored and emersion committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    7ec9523 View commit details
    Browse the repository at this point in the history
  9. Link to gamja for web chat

    gamja offers a better experience than Kiwi.
    emersion authored and bl4ckb0ne committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    c8d97e2 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2021

  1. render/allocator: re-open GBM FD

    Using the same DRM file description for the DRM backend and for the
    GBM allocator will result in GEM handle ref'counting issues [1].
    Re-open the DRM FD to fix these issues.
    
    [1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110
    emersion authored and bl4ckb0ne committed Sep 1, 2021
    Configuration menu
    Copy the full SHA
    d9d8fc1 View commit details
    Browse the repository at this point in the history
  2. render/allocator/gbm: fix create() docs for FD ownership

    Fixes: d9d8fc1 ("render/allocator: re-open GBM FD")
    emersion committed Sep 1, 2021
    Configuration menu
    Copy the full SHA
    ee6c841 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d9523fa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    267eb02 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2021

  1. contributing: don't reference issues in commit first line

    Commits named "Fix #XXX" make it pretty complicated to figure out
    exactly what the commit is doing from the shortlog. A better place
    for issue references is in the extended commit message.
    emersion authored and bl4ckb0ne committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    b0972a9 View commit details
    Browse the repository at this point in the history
  2. scene: iterate nodes instead of surfaces when rendering

    This will allow us to create node types which are rendered but not
    surface-based, such as a solid color or image.
    djpohly authored and emersion committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    526652a View commit details
    Browse the repository at this point in the history
  3. scene: add RECT node type

    RECT is a solid-colored rectangle, useful for simple borders or other
    decoration.  This can be rendered directly using the wlr_renderer,
    without needing to create a surface.
    djpohly authored and emersion committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    b7cd06e View commit details
    Browse the repository at this point in the history
  4. scene: replace surface_at() with node_at()

    With the addition of a non-surface node type, it was unclear how such
    nodes should interact with scene_node_surface_at().  For example, if the
    topmost node at the given point is a RECT, should the function treat
    that node as transparent and continue searching, or as opaque and return
    (probably) NULL?
    
    Instead, replace the function with one returning a scene_node, which
    will allow for more consistent behavior across different node types.
    Compositors can downcast scene_surface nodes via the now-public
    wlr_scene_surface_from_node() if they need access to the surface itself.
    djpohly authored and emersion committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    9ed16e3 View commit details
    Browse the repository at this point in the history
  5. examples/scene-graph: demonstrate scene_rect node type

    Add RECT nodes to the scene-graph demo to illustrate how they are used.
    Here, we add a solid rectangle behind each surface as a quick-and-dirty
    border, handling surface.commit in order to size it appropriately.
    djpohly authored and emersion committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    e2e68ff View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    00c2bae View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2021

  1. Configuration menu
    Copy the full SHA
    7df2ae8 View commit details
    Browse the repository at this point in the history
  2. backend/drm: handle drm_surface_blit errors

    drm_surface_blit returns NULL on error. This can happen e.g. when
    the source buffer cannot be imported into EGL.
    
    Closes: swaywm#3154
    emersion committed Sep 3, 2021
    Configuration menu
    Copy the full SHA
    5aa5137 View commit details
    Browse the repository at this point in the history
  3. render/allocator/gbm: add log message for gbm_bo_get_fd_for_plane

    Makes it easier to find out which branch is taken when debugging
    issues like [1].
    
    [1]: swaywm#3156
    emersion authored and kennylevinsen committed Sep 3, 2021
    Configuration menu
    Copy the full SHA
    38cd1b4 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2021

  1. util/shm: add allocate_shm_file_pair

    This function behaves like allocate_shm_file, except it also
    returns a read-only FD. This is useful to share the same segment
    of memory with many Wayland clients.
    emersion authored and kennylevinsen committed Sep 5, 2021
    Configuration menu
    Copy the full SHA
    55ca934 View commit details
    Browse the repository at this point in the history
  2. keyboard: add wlr_keyboard.keymap_fd

    This exposes a read-only FD with the keymap.
    emersion authored and kennylevinsen committed Sep 5, 2021
    Configuration menu
    Copy the full SHA
    62924cc View commit details
    Browse the repository at this point in the history
  3. seat: avoid copying the keymap for each client

    We can just send a read-only file descriptor instead.
    emersion authored and kennylevinsen committed Sep 5, 2021
    Configuration menu
    Copy the full SHA
    d290b13 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2021

  1. surface: cache frame callback lists again

    Caching frame callback lists is actually the correct behavior, because
    if a surface is locked because of e.g. subsurface synchronization,
    clients would expect to receive frame done events only after the
    pending state is actually committed.
    Kirill Primak authored and emersion committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    242c237 View commit details
    Browse the repository at this point in the history
  2. subsurface: rename wlr_subsurface_state to wlr_subsurface_parent_state

    Add a comment to explain the difference.
    emersion committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    56b6b80 View commit details
    Browse the repository at this point in the history
  3. subsurface: move parent link to state

    Move the wlr_subsurface parent link to the subsurface state.
    
    This is a dumb find/replace operation. This shouldn't result in
    any behavior change.
    emersion committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    3ac99fa View commit details
    Browse the repository at this point in the history
  4. surface: move subsurface lists to state

    Kirill Primak authored and emersion committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    90e6239 View commit details
    Browse the repository at this point in the history
  5. surface: rename impl and its functions

    This makes the naming consistent with other resource implementations.
    Kirill Primak authored and emersion committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    ba55c7c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cf56596 View commit details
    Browse the repository at this point in the history
  7. surface: inline surface_commit_pending()

    Kirill Primak authored and emersion committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    610f0c0 View commit details
    Browse the repository at this point in the history
  8. buffer: take a wlr_buffer in wlr_client_buffer_apply_damage

    Instead of taking a wl_resource as argument, take a wlr_buffer.
    emersion committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    cbe099d View commit details
    Browse the repository at this point in the history
  9. buffer: make wlr_client_buffer_apply_damage return a bool

    We always return the same wlr_client_buffer as the one passed in,
    so no need to return anything.
    emersion committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    bb82b6d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    24c397d View commit details
    Browse the repository at this point in the history
  11. viewporter: hide wlr_viewport

    This is an internal struct.
    emersion committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    0fe3b45 View commit details
    Browse the repository at this point in the history
  12. surface: ensure buffer is reset to NULL in surface_state_move

    When surface_state_move processes a NULL commit, make sure to
    reset state->buffer to NULL instead of leaving behind an old
    wlr_buffer.
    emersion authored and bl4ckb0ne committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    0978a70 View commit details
    Browse the repository at this point in the history
  13. surface: drop wlr_surface_state.buffer_resource

    Instead, use wlr_surface_state.buffer only.
    emersion authored and bl4ckb0ne committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    ba0525c View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2021

  1. surface: fix abort on NULL buffer attach

    Fixes: ba0525c ("surface: drop wlr_surface_state.buffer_resource")
    Closes: swaywm#3173
    emersion committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    8891946 View commit details
    Browse the repository at this point in the history
  2. backend/drm: rename enum wlr_drm_connector_state to status

    "state" is easily confused with wlr_output_state.
    emersion committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    3fbf6e0 View commit details
    Browse the repository at this point in the history
  3. backend/drm: introduce wlr_drm_connector_state

    Previously, we were copying wlr_output_state on the stack and
    patching it up to be guaranteed to have a proper drmModeModeInfo
    stored in it (and not a custom mode). Also, we had a bunch of
    helpers deriving DRM-specific information from the generic
    wlr_output_state.
    
    Copying the wlr_output_state worked fine so far, but with output
    layers we'll be getting a wl_list in there. An empty wl_list stores
    two pointers to itself, copying it on the stack blindly results in
    infinite loops in wl_list_for_each.
    
    To fix this, rework our DRM backend to stop copying wlr_output_state,
    instead add a new struct wlr_drm_connector_state which holds both
    the wlr_output_state and additional DRM-specific information.
    emersion committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    3c74bd0 View commit details
    Browse the repository at this point in the history
  4. backend/drm: fix crash on VT switch

    Don't set the MODE flag when disabling a CRTC. This fixes a NULL
    pointer dereference in drm_connector_state_init.
    emersion committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    274c818 View commit details
    Browse the repository at this point in the history
  5. backend/drm: drop unused arg from get_possible_crtcs

    Constify drmModeConnector while at it.
    emersion authored and bl4ckb0ne committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    de1c730 View commit details
    Browse the repository at this point in the history
  6. backend/drm: drop drm_connector_init_renderer

    drm_connector_set_pending_fb already takes care of this.
    emersion committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    0c8fba1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    35f0a0d View commit details
    Browse the repository at this point in the history
  8. output-damage: fix damage on modeset

    On modeset wlr_output will internally allocate a buffer. The
    backend will emit a "mode" output event, then wlr_output will
    emit a "commit" event.
    
    wlr_output_damage handles the "mode" event by damaging the whole
    output, and then handles the "commit" event. However the commit
    event has a buffer, so wlr_output_damage rotates the damage in its
    ring buffer, thinking the compositor has rendered a frame. The
    compositor hasn't rendered a frame, what wlr_output_damage sees is
    the internal wlr_output black buffer used for the modeset.
    
    Let's fix this by damaging the whole output in the "commit" event
    handler if the mode has changed. Additionally, damage the whole
    output after rotating the damage ring buffer.
    emersion authored and kennylevinsen committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    04304c3 View commit details
    Browse the repository at this point in the history
  9. backend/drm: drop attempt_enable_needs_modeset

    Modesets require a buffer. The DRM backend tried to auto-enable
    outputs when a CRTC becomes available in the past, but now that
    fails because no buffer is available.
    
    Instead of having this magic inside the DRM backend, a better
    approach is to do it in the compositor or in an optional helper.
    emersion authored and kennylevinsen committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    b01d97a View commit details
    Browse the repository at this point in the history
  10. backend/drm: drop wlr_drm_connector.desired_mode

    Previously used by attempt_enable_needs_modeset, but this has been
    dropped in the previous commit.
    emersion authored and kennylevinsen committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    42dba9d View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2021

  1. Configuration menu
    Copy the full SHA
    e5a949a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    94ed8f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c67e3fe View commit details
    Browse the repository at this point in the history
  4. types: introduce wlr_drm_lease_v1

    bl4ckb0ne authored and emersion committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    3984c81 View commit details
    Browse the repository at this point in the history
  5. scene: fix wlr_scene_render_output offset

    When providing non-zero layout-local coordinates to
    wlr_scene_render_output, the viewport should be translated by the
    given values. However the viewport was translated by the opposite
    values: when giving 42,42 the viewport's position would be set to
    -42,-42.
    emersion authored and bl4ckb0ne committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    872993f View commit details
    Browse the repository at this point in the history
  6. scene: add scene outputs

    These allow describing an output's viewport inside the scene-graph.
    emersion authored and bl4ckb0ne committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    968c1df View commit details
    Browse the repository at this point in the history
  7. scene: add wlr_scene_output_commit

    emersion authored and bl4ckb0ne committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    04d1057 View commit details
    Browse the repository at this point in the history
  8. scene: add wlr_scene_node_coords

    emersion authored and bl4ckb0ne committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    9195b77 View commit details
    Browse the repository at this point in the history
  9. scene: add damage tracking support

    emersion authored and bl4ckb0ne committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    44f0f7a View commit details
    Browse the repository at this point in the history
  10. examples/scene-graph: use wlr_scene_output

    This allows us to get damage tracking for free™.
    emersion authored and bl4ckb0ne committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    e05c884 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2021

  1. scene: fix compile error in release builds

    On release builds, gcc detects a variable uninitialized error, and generates
    a warning, which gets converted to an error due to -Werror.
    quantum5 authored and emersion committed Sep 9, 2021
    Configuration menu
    Copy the full SHA
    679f5ed View commit details
    Browse the repository at this point in the history
  2. scene: move source to subdir

    This will allow more scene-graph extensions to be added without
    cluttering wlr_scene.c, for instance for sub-surface handling and
    wlr_output_layout integration.
    emersion authored and kennylevinsen committed Sep 9, 2021
    Configuration menu
    Copy the full SHA
    7832005 View commit details
    Browse the repository at this point in the history
  3. scene: add wlr_scene_attach_output_layout

    This is a helper to integrate wlr_scene with wlr_output_layout.
    emersion authored and kennylevinsen committed Sep 9, 2021
    Configuration menu
    Copy the full SHA
    a181a37 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2021

  1. Configuration menu
    Copy the full SHA
    04d234b View commit details
    Browse the repository at this point in the history
  2. screencopy: Handle shm copy in commit event handler

    This simplifies the implementation considerably.
    any1 authored and emersion committed Sep 10, 2021
    Configuration menu
    Copy the full SHA
    105fdec View commit details
    Browse the repository at this point in the history
  3. buffer: add data_ptr access flags

    This allows callers to specify the operations they'll perform on
    the returned data pointer. The motivations for this are:
    
    - The upcoming Linux MAP_NOSIGBUS flag may only be usable on
      read-only mappings.
    - gbm_bo_map with GBM_BO_TRANSFER_READ hurts performance.
    emersion authored and bl4ckb0ne committed Sep 10, 2021
    Configuration menu
    Copy the full SHA
    4e7a870 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2021

  1. xwayland: Allow to retrieve startup-id via _NET_STARTUP_INFO

    A launchee notifies with a "remove"¹ message when done starting up.
    Catch these and forward to the compositor. This allows the compositor to
    end the startup sequence that might have been started by another
    protocol like xdg-activation.
    
    We don't handle other messages since we expect the launcher to use a
    wayland protocol like xdg-activation.
    
    While `_NET_STARTUP_ID` helps to associate toplevels with startup-ids
    this signals the end of the startup sequence.
    
    1) https://specifications.freedesktop.org/startup-notification-spec/startup-notification-latest.txt
    agx authored and emersion committed Sep 11, 2021
    Configuration menu
    Copy the full SHA
    e479dc1 View commit details
    Browse the repository at this point in the history
  2. xdg popup: move function to a file it belongs to

    Kirill Primak authored and emersion committed Sep 11, 2021
    Configuration menu
    Copy the full SHA
    52da68b View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2021

  1. ci: switch to seatd-launch

    This removes the need for the ad-hoc loop.
    
    Because udev creates the symlinks in /dev/dri/by-path/, we need to
    wait for it to consume all pending events before the chmod call.
    Previously the delay needed for seatd to come up was enough to let
    udev create the symlinks in time (by chance).
    emersion authored and kennylevinsen committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    6cb25eb View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2021

  1. Configuration menu
    Copy the full SHA
    9579d62 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2021

  1. xdg-toplevel: refactor configure/state flow

    Previously, `wlr_xdg_toplevel` didn't follow the usual "current state +
    pending state" pattern and instead had confusingly named
    `client_pending` and `server_pending`. This commit removes them, and
    instead introduces `wlr_xdg_toplevel.scheduled` to store the properties
    that are yet to be sent to a client, and `wlr_xdg_toplevel.requested`
    to store the properties that a client has requested. They have different
    types to emphasize that they aren't actual states.
    Kirill Primak authored and emersion committed Sep 21, 2021
    Configuration menu
    Copy the full SHA
    b72a217 View commit details
    Browse the repository at this point in the history
  2. xdg-surface: simplify configure mechanism

    This commit removes any checks whether a configure will change anything
    and makes configures be sent unconditionally. Additionally, configures
    are scheduled on xdg_toplevel.{un,}set_{maximized,fullscreen} events.
    Kirill Primak authored and emersion committed Sep 21, 2021
    Configuration menu
    Copy the full SHA
    0e2d369 View commit details
    Browse the repository at this point in the history
  3. xdg surface: check adding configure_idle for NULL

    Kirill Primak authored and emersion committed Sep 21, 2021
    Configuration menu
    Copy the full SHA
    ccc84f1 View commit details
    Browse the repository at this point in the history
  4. scene: add wlr_scene_tree

    emersion authored and ifreund committed Sep 21, 2021
    Configuration menu
    Copy the full SHA
    211b3b7 View commit details
    Browse the repository at this point in the history
  5. surface: add addon set

    emersion authored and ifreund committed Sep 21, 2021
    Configuration menu
    Copy the full SHA
    597ba2b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2e59002 View commit details
    Browse the repository at this point in the history
  7. build: simplify get_variable calls

    With recent-ish Meson we can stop repeating the variable name for
    each provider.
    emersion authored and bl4ckb0ne committed Sep 21, 2021
    Configuration menu
    Copy the full SHA
    0c5ff5e View commit details
    Browse the repository at this point in the history
  8. backend/drm: add support for panel orientation

    Expose the panel orientation with wlr_drm_connector_get_panel_orientation.
    Leave it to the compositor to consume this information and configure the
    output accordingly.
    
    Closes: swaywm#1581
    emersion authored and bl4ckb0ne committed Sep 21, 2021
    Configuration menu
    Copy the full SHA
    2e12de9 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2021

  1. Configuration menu
    Copy the full SHA
    e0daa65 View commit details
    Browse the repository at this point in the history
  2. Implement input_method_v2 popups

    tadeokondrak authored and emersion committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    30d3c76 View commit details
    Browse the repository at this point in the history
  3. scene: drop default case in wlr_scene_node_at

    This allows the compiler to error out if we haven't enumerated all
    of the cases. This is useful to avoid a missing implementation when
    adding a new node type.
    emersion authored and bl4ckb0ne committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    b25759c View commit details
    Browse the repository at this point in the history
  4. scene: unify intersection logic in wlr_scene_node_at

    Let's extract the common bits.
    emersion authored and bl4ckb0ne committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    f6f0e01 View commit details
    Browse the repository at this point in the history
  5. scene: add wlr_scene_buffer

    This new scene-graph node displays a wlr_buffer.
    
    Closes: swaywm#3161
    emersion authored and bl4ckb0ne committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    7939bf8 View commit details
    Browse the repository at this point in the history
  6. util/box: introduce wlr_fbox_empty

    Same as wlr_box_empty, but for wlr_fbox.
    emersion authored and bl4ckb0ne committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    fdc2244 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    63040d6 View commit details
    Browse the repository at this point in the history
  8. scene: add scene_node_get_size helper

    emersion authored and bl4ckb0ne committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    27b529f View commit details
    Browse the repository at this point in the history
  9. scene: use scene_node_get_size in wlr_scene_node_at

    This allows to unify the RECT and BUFFER code-paths. The BUFFER one
    will become more complicated with destination size and transforms.
    emersion authored and bl4ckb0ne committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    3d4afbe View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    43833fb View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    3c26244 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2021

  1. layer-shell: refactor configure/state flow

    Same logic as xdg-toplevel.
    Kirill Primak authored and ifreund committed Sep 23, 2021
    Configuration menu
    Copy the full SHA
    59fa363 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2021

  1. layer-shell: add committed bitmask

    Kirill Primak authored and emersion committed Sep 24, 2021
    Configuration menu
    Copy the full SHA
    754f40f View commit details
    Browse the repository at this point in the history
  2. Fix a typo in CONTRIBUTING.md

    hhirtz authored and emersion committed Sep 24, 2021
    Configuration menu
    Copy the full SHA
    d96d2f5 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2021

  1. Configuration menu
    Copy the full SHA
    fb15538 View commit details
    Browse the repository at this point in the history
  2. pointer: add hold pointer event definition

    As touchpad touches are generally fully abstracted, a client cannot
    currently know when a user is interacting with the touchpad without
    moving. This is solved by hold gestures.
    
    Hold gestures are notifications about one or more fingers being held
    down on the touchpad without significant movement.
    
    Hold gestures are primarily designed for two interactions:
    
     - Hold to interact: where a hold gesture is active for some time a
       menu could pop up, some object could be selected, etc.
     - Hold to cancel: where e.g. kinetic scrolling is currently active,
       the start of a hold gesture can be used to stop the scroll.
    
    Unlike swipe and pinch, hold gestures, by definition, do not have
    movement, so there is no need for an "update" stage in the gesture.
    
    Create two structs, wlr_event_pointer_hold_begin and
    wlr_event_pointer_hold_end, to represent hold gesture events and the
    signals to emit them: wlr_pointer->pointer.hold_begin/hold_end.
    JoseExposito authored and emersion committed Sep 27, 2021
    Configuration menu
    Copy the full SHA
    d069a78 View commit details
    Browse the repository at this point in the history
  3. build: check if libinput supports hold gestures

    Add a project argument (LIBINPUT_HAS_HOLD_GESTURES) to allow building
    against old versions of libinput.
    JoseExposito authored and emersion committed Sep 27, 2021
    Configuration menu
    Copy the full SHA
    95970b3 View commit details
    Browse the repository at this point in the history
  4. backend/libinput: send hold gesture events

    Receive hold gesture events from libinput and emit the appropiate
    wlr_pointer signal.
    JoseExposito authored and emersion committed Sep 27, 2021
    Configuration menu
    Copy the full SHA
    52d2491 View commit details
    Browse the repository at this point in the history
  5. backend/wayland: send hold gesture events

    Receive hold gesture events using a Wayland listiner and emit the
    appropiate wlr_pointer signal.
    JoseExposito authored and emersion committed Sep 27, 2021
    Configuration menu
    Copy the full SHA
    62e62b6 View commit details
    Browse the repository at this point in the history
  6. cursor: emit hold gesture events

    Recevie the hold gesture events from the libinput or Wayland backends,
    abstracted as pointer signals, and re-emit them from the cursor
    interface.
    JoseExposito authored and emersion committed Sep 27, 2021
    Configuration menu
    Copy the full SHA
    4c3e307 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5f3e490 View commit details
    Browse the repository at this point in the history
  8. wlr_pointer_gestures: hold gestures (protocol v3)

    Update the pointer gestures protocol to version 3 allowing to send hold
    gestures to clients.
    JoseExposito authored and emersion committed Sep 27, 2021
    Configuration menu
    Copy the full SHA
    20d9448 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2021

  1. backend: create renderer and allocator in wlr_backend_autocreate

    Instead of ensuring the renderer and allocator are initialized in each
    backend, do it in wlr_backend_autocreate. This allows compositors to
    create backends without any renderer/allocator if they side-step
    wlr_backend_autocreate.
    
    Since the wlr_backend_get_renderer and backend_get_allocator end up
    calling wlr_renderer_autocreate and wlr_allocator_autocreate, it sounds
    like a good idea to centralize all of the opimionated bits in one place.
    emersion authored and bl4ckb0ne committed Sep 30, 2021
    Configuration menu
    Copy the full SHA
    3d0848d View commit details
    Browse the repository at this point in the history
  2. xdg-surface: add pending state

    struct wlr_xdg_surface_state is introduced to hold the geometry
    and configure serial to be applied on next wl_surface.commit.
    
    This commit fixes our handling for ack_configure: instead of making
    the request mutate our current state, it mutates the pending state
    only.
    
    Co-authored-by: Simon Ser <contact@emersion.fr>
    Kirill Primak and emersion committed Sep 30, 2021
    Configuration menu
    Copy the full SHA
    db4afc2 View commit details
    Browse the repository at this point in the history
  3. xdg-shell: introduce wlr_xdg_surface.current

    This holds the current state, and avoids having ad-hoc fields in
    wlr_xdg_surface.
    emersion authored and Kirill Primak committed Sep 30, 2021
    Configuration menu
    Copy the full SHA
    0e34208 View commit details
    Browse the repository at this point in the history
  4. xdg-shell: rename wlr_xdg_surface.next_configure_serial

    Rename it to scheduled_serial for consistency with the rest of
    wlroots.
    emersion authored and Kirill Primak committed Sep 30, 2021
    Configuration menu
    Copy the full SHA
    665a164 View commit details
    Browse the repository at this point in the history
  5. xdg-shell: stop clearing wlr_xdg_surface state on unmap

    The protocol doesn't say we should, so let's not.
    
    Also it's pointless to reset scheduled_serial, since 0 is a valid
    serial.
    emersion authored and Kirill Primak committed Sep 30, 2021
    Configuration menu
    Copy the full SHA
    744a5c2 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2021

  1. Configuration menu
    Copy the full SHA
    833437d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ea7357b View commit details
    Browse the repository at this point in the history
  3. backend/drm: fail on explicit modifier in drmModeAddFB2

    drmModeAddFB2 doesn't support explicit modifiers. Only accept INVALID
    which indicates an implicit modifier and LINEAR which may indicate
    that GBM_BO_USE_LINEAR has been used.
    emersion authored and bl4ckb0ne committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    d6be1d6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    780052d View commit details
    Browse the repository at this point in the history
  5. render/drm_format_set: remove special LINEAR case

    This was used to make the intersection of INVALID and LINEAR result
    in LINEAR. We can now just require LINEAR to be in both lists.
    emersion authored and bl4ckb0ne committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    6d281d9 View commit details
    Browse the repository at this point in the history
  6. Revert "render/drm_format_set: remove special LINEAR case"

    This reverts commit 6d281d9.
    emersion authored and bl4ckb0ne committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    42138a0 View commit details
    Browse the repository at this point in the history
  7. Revert "render/egl: always add LINEAR to supported modifiers"

    This reverts commit 780052d.
    emersion authored and bl4ckb0ne committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    62be833 View commit details
    Browse the repository at this point in the history
  8. Revert "backend/drm: fail on explicit modifier in drmModeAddFB2"

    This reverts commit d6be1d6.
    emersion authored and bl4ckb0ne committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    61b8344 View commit details
    Browse the repository at this point in the history
  9. Revert "Require INVALID for implicit format modifiers"

    This reverts commit ea7357b.
    emersion authored and bl4ckb0ne committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    1d7e438 View commit details
    Browse the repository at this point in the history
  10. Revert "render/drm_format_set: add wlr_drm_format_has"

    This reverts commit 833437d.
    emersion authored and bl4ckb0ne committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    323b849 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2021

  1. Fix spelling errors

    Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
    ElyesH authored and emersion committed Oct 2, 2021
    Configuration menu
    Copy the full SHA
    dc3d153 View commit details
    Browse the repository at this point in the history
  2. for_each_surface: only iterate mapped surfaces

    These functions are used mostly for rendering, where including unmapped
    surfaces is undesired.
    
    This is a breaking change. However, few to no usages will have to be
    updated.
    tiosgz authored and emersion committed Oct 2, 2021
    Configuration menu
    Copy the full SHA
    893434b View commit details
    Browse the repository at this point in the history
  3. surface_at: check if surfaces are mapped

    tiosgz authored and emersion committed Oct 2, 2021
    Configuration menu
    Copy the full SHA
    ce66244 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2021

  1. render/allocator: use render node if available in reopen_drm_node

    If we aren't trying to create a dumb buffer allocator, and if the
    DRM device has a render node (ie, not a split render/display SoC),
    then we can use the render node instead of the primary node. This
    should allow wlroots to run under seatd when the current user
    doesn't have the permission to open primary nodes (logind has a
    quirk to allow physically logged in users to open primary nodes).
    emersion authored and kennylevinsen committed Oct 4, 2021
    Configuration menu
    Copy the full SHA
    13cdb84 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2021

  1. backend: drop unconditional and unused <libinput.h>

    After 70fb21c made libinput optional the include prevents
    building without libinput package installed.
    
    backend/backend.c:4:10: fatal error: 'libinput.h' file not found
     #include <libinput.h>
              ^~~~~~~~~~~~
    jbeich authored and emersion committed Oct 5, 2021
    Configuration menu
    Copy the full SHA
    31af2b6 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2021

  1. xdg-shell: remove redundant NULL buffer check

    This is already checked in role precommit handler, and if the buffer is
    NULL due to failed upload, that means the surface was already unmapped.
    Kirill Primak authored and emersion committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    28248dd View commit details
    Browse the repository at this point in the history
  2. layer-shell: move NULL buffer check to role precommit handler

    This will allow compositor to access the current buffer before
    unmapping.
    Kirill Primak authored and emersion committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    cdaab82 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2021

  1. xdg-decoration: refactor configure/state flow

    The same logic/motivation as xdg-toplevel.
    Kirill Primak authored and bl4ckb0ne committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    c3e5402 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dc22a06 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2021

  1. scene: assert that node != sibling in place above/below

    Currently these functions remove the node from the scene if the sibling
    argument is the same node as the node. To prevent confusion when
    misusing this API, assert that the nodes are distinct and document this.
    ifreund authored and emersion committed Oct 14, 2021
    Configuration menu
    Copy the full SHA
    2a8d385 View commit details
    Browse the repository at this point in the history
  2. scene: add functions to place node on top/bottom

    These are very common operations for compositors (including tinywl)
    to perform.
    ifreund authored and emersion committed Oct 14, 2021
    Configuration menu
    Copy the full SHA
    4fae8f7 View commit details
    Browse the repository at this point in the history
  3. render/allocator: use empty DRM lease to re-open node

    This allows us to obtain a new DRM file description without relying
    on filesystem permissions.
    emersion committed Oct 14, 2021
    Configuration menu
    Copy the full SHA
    1b65a80 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2021

  1. output: disallow NULL event for wlr_output_send_present()

    Kirill Primak authored and emersion committed Oct 15, 2021
    Configuration menu
    Copy the full SHA
    1089b7b View commit details
    Browse the repository at this point in the history
  2. output: add presented flag to presentation event

    Kirill Primak authored and emersion committed Oct 15, 2021
    Configuration menu
    Copy the full SHA
    2af8cc7 View commit details
    Browse the repository at this point in the history
  3. presentation-time: don't send presented on discard

    Kirill Primak authored and emersion committed Oct 15, 2021
    Configuration menu
    Copy the full SHA
    2edf468 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2021

  1. render/vulkan: add Vulkan renderer

    This new renderer is implemented with the existing wlr_renderer API
    (which is known to be sub-optimal for some operations). It's not
    used by default, but users can opt-in by setting WLR_RENDERER=vulkan.
    
    The renderer depends on VK_EXT_image_drm_format_modifier and
    VK_EXT_physical_device_drm.
    
    Co-authored-by: Simon Ser <contact@emersion.fr>
    Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
    3 people committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    8e34692 View commit details
    Browse the repository at this point in the history
  2. Add error handling to backend creation

    This commit adds two error-handling cases to the function
    attempt_dmr_backend. Specifically:
    
    - In the case where the number of found GPUs is zero, we now
      print a log message indicating this and return a NULL pointer
    - In the case where we could not successfully create a backend
      on any GPU, we now log a message indicating this and return
      a NULL pointer
    
    This allows us to provide more descriptive error messages,
    as well as avoid a SEGFAULT (the function
    `ensure_primary_backend_renderer_and_allocator` dereferences the pointer
    given, which could be NULL until this patch) when these cases arise.
    AnthonySuper authored and emersion committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    e22a386 View commit details
    Browse the repository at this point in the history
  3. render/vulkan: Use image view swizzles instead of shader hack

    Signed-off-by: Joshua Ashton <joshua@froggi.es>
    Joshua-Ashton authored and emersion committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    b62ce3c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f7ea33d View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2021

  1. render/vulkan: check vulkan-headers dependency

    There's no pkg-config file we can check for sadly, so check
    vulkan/vulkan.h as a fallback.
    
    Closes: swaywm#3272
    emersion authored and bl4ckb0ne committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    36cf387 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2021

  1. Update loc count in readme

    buffet authored and emersion committed Oct 21, 2021
    Configuration menu
    Copy the full SHA
    3dc99ed View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2021

  1. presentation-time: use a surface addon

    Kirill Primak authored and emersion committed Oct 22, 2021
    Configuration menu
    Copy the full SHA
    6c3a71d View commit details
    Browse the repository at this point in the history
  2. presentation-time: remove unused field

    emersion authored and bl4ckb0ne committed Oct 22, 2021
    Configuration menu
    Copy the full SHA
    7c10a77 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    70e8277 View commit details
    Browse the repository at this point in the history
  4. scene: add wlr_scene_output_for_each_surface

    This allows compositors to more easily implement sending
    wl_surface.frame callback done events.
    emersion authored and ifreund committed Oct 22, 2021
    Configuration menu
    Copy the full SHA
    db4c930 View commit details
    Browse the repository at this point in the history
  5. scene: add support for direct scan-out

    Check if only a single node intersects with the output viewport
    and all of its properties match. In this case, attempt direct
    scan-out.
    emersion authored and kennylevinsen committed Oct 22, 2021
    Configuration menu
    Copy the full SHA
    a4ccca0 View commit details
    Browse the repository at this point in the history
  6. output: split into multiple files

    This organizes the wlr_output implementation into separate files.
    This avoids having a single mega-file with lots of unrelated parts
    and makes it more obvious what the interactions between all the
    parts are.
    
    No functional changes, just moving code around.
    emersion authored and kennylevinsen committed Oct 22, 2021
    Configuration menu
    Copy the full SHA
    fb393dd View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2021

  1. xdg-foreign-v2: use error enum

    A wayland-protocols patch [1] has added error codes for invalid
    surfaces.
    
    [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/57
    
    Closes: swaywm#2600
    emersion authored and Kirill Primak committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    3d6ca99 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2021

  1. output: refuse to enable with zero mode

    This can happen if the compositor enables an output without
    picking a mode, or performs a modeset with a zero width/height.
    emersion authored and bl4ckb0ne committed Oct 26, 2021
    Configuration menu
    Copy the full SHA
    bf42630 View commit details
    Browse the repository at this point in the history
  2. readme: refresh dependencies

    emersion authored and kennylevinsen committed Oct 26, 2021
    Configuration menu
    Copy the full SHA
    c43130c View commit details
    Browse the repository at this point in the history
  3. backend/drm: add entry for Valve EDID vendor

    As found in e.g. the Steam Deck.
    emersion authored and bl4ckb0ne committed Oct 26, 2021
    Configuration menu
    Copy the full SHA
    5619cf3 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2021

  1. Configuration menu
    Copy the full SHA
    cbedbd0 View commit details
    Browse the repository at this point in the history
  2. backend.c: do not try to explicitly clean up the libinput backend

    Since libinput is an optional dependency the libinput backend is possibly undeclared.
    wlr_backend_destroy(backend) below will clean up the child libinput backend if any.
    MarkusVolk authored and emersion committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    ebe3cfa View commit details
    Browse the repository at this point in the history
  3. render/pixman/renderer.c: Fix memory-leak in create_buffer

    Found via scan-build
    lanodan authored and bl4ckb0ne committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    4fb652c View commit details
    Browse the repository at this point in the history
  4. render/egl.c: Fix memory leaks in egl_create

    calloc is moved to right before egl is called to avoid requiring to free()
    unused memory.
    
    Found via scan-build
    lanodan authored and bl4ckb0ne committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    6666604 View commit details
    Browse the repository at this point in the history
  5. backend/drm/legacy.c: Fix memory leak in drm_legacy_crtc_set_gamma

    Found via scan-build
    lanodan authored and bl4ckb0ne committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    a92293a View commit details
    Browse the repository at this point in the history
  6. scene: inline subsurface_tree_destroy

    This is only called from one function.
    
    To destroy the wlr_scene_subsurface_tree from elsewhere, callers
    can destroy the scene-graph node returned by
    wlr_scene_subsurface_tree_create instead (just like a compositor
    would do). subsurface_tree_handle_surface_destroy does exactly this.
    
    Inlining avoids calling subsurface_tree_destroy by mistake.
    emersion authored and ifreund committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    a80f2b2 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2021

  1. sceeencopy-v1: listen to output destroy in capture_output

    If the output is destroyed after capture_output but before
    frame_handle_copy, it'll have a dangling output pointer. Add the
    output destroy listener in capture_output.
    
    Closes: swaywm#3284
    emersion committed Oct 29, 2021
    Configuration menu
    Copy the full SHA
    3b96aa0 View commit details
    Browse the repository at this point in the history
  2. backend/drm: get rid of BO handle table

    The BO handle table exists to avoid double-closing a BO handle,
    which aren't reference-counted by the kernel. But if we can
    guarantee that there is only ever a single ref for each BO handle,
    then we don't need the BO handle table anymore.
    
    This is possible if we create the handle right before the ADDFB2
    IOCTL, and close the handle right after. The handles are very
    short-lived and we don't need to track their lifetime.
    
    Because of multi-planar FBs, we need to be a bit careful: some
    FB planes might share the same handle. But with a small check, it's
    easy to avoid double-closing the same handle (which wouldn't be a
    big deal anyways).
    
    There's one gotcha though: drmModeSetCursor2 takes a BO handle as
    input. Saving the handles until drmModeSetCursor2 time would require
    us to track BO handle lifetimes, so we wouldn't be able to get rid
    of the BO handle table. As a workaround, use drmModeGetFB to turn the
    FB ID back to a BO handle, call drmModeSetCursor2 and then immediately
    close the BO handle. The overhead should be minimal since these IOCTLs
    are pretty cheap.
    
    Closes: swaywm#3164
    emersion committed Oct 29, 2021
    Configuration menu
    Copy the full SHA
    0817c52 View commit details
    Browse the repository at this point in the history
  3. output: fix stack variable lifetime in wlr_output_send_present

    Variables on the stack are released when the parent block is closed.
    Here, `now` is used outside of the `if` block, causing the following
    crash when starting Sway with the headless backend:
    
        ==49606==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fff94645f90 at pc 0x5558aeae9e29 bp 0x7fff94645df0 sp 0x7fff94645de0
        READ of size 16 at 0x7fff94645f90 thread T0
            #0 0x5558aeae9e28 in handle_present ../sway/desktop/output.c:834
            emersion#1 0x7fdc8d6792fb in wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29
            emersion#2 0x7fdc8d54f77f in wlr_output_send_present ../subprojects/wlroots/types/output/output.c:766
            swaywm#3 0x7fdc8d524a28 in output_commit ../subprojects/wlroots/backend/headless/output.c:71
            swaywm#4 0x7fdc8d54d2db in wlr_output_commit ../subprojects/wlroots/types/output/output.c:629
            swaywm#5 0x5558aeb013cb in output_render ../sway/desktop/render.c:1157
            swaywm#6 0x5558aeae549e in output_repaint_timer_handler ../sway/desktop/output.c:544
            swaywm#7 0x5558aeae5f8a in damage_handle_frame ../sway/desktop/output.c:606
            swaywm#8 0x7fdc8d6792fb in wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29
            swaywm#9 0x7fdc8d6007d5 in output_handle_frame ../subprojects/wlroots/types/wlr_output_damage.c:44
            swaywm#10 0x7fdc8d6792fb in wlr_signal_emit_safe ../subprojects/wlroots/util/signal.c:29
            swaywm#11 0x7fdc8d54ee84 in wlr_output_send_frame ../subprojects/wlroots/types/output/output.c:720
            swaywm#12 0x7fdc8d54efc3 in schedule_frame_handle_idle_timer ../subprojects/wlroots/types/output/output.c:728
            swaywm#13 0x7fdc8c9dcf5a in wl_event_loop_dispatch_idle (/usr/lib/libwayland-server.so.0+0xaf5a)
            swaywm#14 0x7fdc8c9dcfb4 in wl_event_loop_dispatch (/usr/lib/libwayland-server.so.0+0xafb4)
            swaywm#15 0x7fdc8c9dabc6 in wl_display_run (/usr/lib/libwayland-server.so.0+0x8bc6)
            swaywm#16 0x5558aeac8e30 in server_run ../sway/server.c:285
            swaywm#17 0x5558aeac3c7d in main ../sway/main.c:396
            swaywm#18 0x7fdc8be35b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
            swaywm#19 0x5558aea8686d in _start (/home/simon/src/sway/build/sway/sway+0x33f86d)
    emersion authored and Kirill Primak committed Oct 29, 2021
    Configuration menu
    Copy the full SHA
    b2f6ff4 View commit details
    Browse the repository at this point in the history
  4. backend/drm: avoid creating empty FB_DAMAGE_CLIPS prop

    drmModeCreatePropertyBlob cannot create zero-sized blobs, that
    fails with EINVAL.
    
    Closes: swaywm#3297
    emersion committed Oct 29, 2021
    Configuration menu
    Copy the full SHA
    83090de View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2021

  1. xdg-activation-v1: enable compositors to request their own tokens

    These new functions allow a compositor to request new managed tokens
    without participating in the xdg-activation procedure as a wayland
    client.
    
    This enables the compositor itself to behave as a launcher
    application.
    Ronan Pigott authored and emersion committed Oct 31, 2021
    Configuration menu
    Copy the full SHA
    6ad0f81 View commit details
    Browse the repository at this point in the history
  2. xdg-activation-v1: add data field and emit token destroy events

    The data field is useful to track metadata about a token. The destroy
    events are useful for compositors that track application startup to
    let them know they can stop doing that.
    Ronan Pigott authored and emersion committed Oct 31, 2021
    Configuration menu
    Copy the full SHA
    e2aff8a View commit details
    Browse the repository at this point in the history
  3. backend/wayland: use xdga client activation

    Ronan Pigott authored and emersion committed Oct 31, 2021
    Configuration menu
    Copy the full SHA
    8e22526 View commit details
    Browse the repository at this point in the history
  4. scene/subsurface_tree: hide unmapped subsurfaces

    tiosgz authored and emersion committed Oct 31, 2021
    Configuration menu
    Copy the full SHA
    cc2ebd9 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2021

  1. ci: add .gitlab-ci.yml

    This is a glue file to allow integration with builds.sr.ht.
    emersion committed Nov 1, 2021
    Configuration menu
    Copy the full SHA
    d1b7567 View commit details
    Browse the repository at this point in the history
  2. s/GitHub/GitLab/

    emersion committed Nov 1, 2021
    Configuration menu
    Copy the full SHA
    8bc1086 View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2021

  1. render: completely disable gles2 if requested but libEGL is found

    For `required` to disable search the value needs to be of `feature` type.
    Checking `gles2` via `in` keyword returns a `bool` but `required: false`
    makes the dependency optional instead of disabled.
    jbeich authored and emersion committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    760e166 View commit details
    Browse the repository at this point in the history
  2. xwayland: add support for -noTouchPointerEmulation

    This allows compositors to handle touch pointer emulation manually,
    instead of having Xwayland do it [1].
    
    [1]: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/691
    emersion committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    3e801d6 View commit details
    Browse the repository at this point in the history
  3. backend/session: introduce wlr_device_change_event

    This struct contains additional information for session device
    change events, such as the DRM connector ID that has changed.
    emersion committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    2ff4e11 View commit details
    Browse the repository at this point in the history
  4. backend/drm: handle per-connector hotplug events

    When a connector ID is specified in a hotplug event, don't scan all
    connectors. Only scan the connector that has changed.
    emersion committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    e13f3f8 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2021

  1. Configuration menu
    Copy the full SHA
    8634dd3 View commit details
    Browse the repository at this point in the history
  2. CONTRIBUTING.md: add CoC section

    Kirill Primak committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    fc1ed72 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2021

  1. Configuration menu
    Copy the full SHA
    eb5f23d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e326b76 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2021

  1. Configuration menu
    Copy the full SHA
    f20c49d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fa77aeb View commit details
    Browse the repository at this point in the history
  3. output: drop wlr_output_export_dmabuf

    Callers can access output->front_buffer instead.
    emersion committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    76bab68 View commit details
    Browse the repository at this point in the history
  4. text-input: fix type of send_preedit_string() args

    The protocol uses a signed integer here, which is also what the
    wlr_input_method_v2_preedit_string struct provides to compositors from
    the input method protocol. Sway currently just passes those int32_t
    values directly to this function leading to an implicit conversion.
    ifreund authored and emersion committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    ab16861 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2021

  1. Configuration menu
    Copy the full SHA
    02a1ae1 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2021

  1. Configuration menu
    Copy the full SHA
    3a685b1 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2021

  1. util/token: don't leak /dev/urandom fd to children

    Closes #3324.
    raphaelr committed Nov 14, 2021
    Configuration menu
    Copy the full SHA
    4a8e681 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2021

  1. backend/headless: unlink input device on destroy

    Removing an input device requires unlinking it from the list of all headless
    input devices. For that implement a destroy function.
    romangg committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    8274c85 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2021

  1. linux-dmabuf-v1: properly validate flags

    We were send a protocol error if INTERLACED or BOTTOM_FIRST was
    set. This is incorrect for the zwp_linux_dmabuf_params.create
    code-path because this kills the client without allowing it to
    gracefully handle the error.
    
    We should only send a protocol error if the client provides a bit
    not listed in the protocol definition.
    emersion authored and bl4ckb0ne committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    9a4e109 View commit details
    Browse the repository at this point in the history
  2. Remove support for DMA-BUF flags

    They are never used in practice, which makes all of our flag
    handling effectively dead code. Also, APIs such as KMS don't
    provide a good way to deal with the flags. Let's just fail the
    DMA-BUF import when clients provide flags.
    emersion authored and bl4ckb0ne committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    a04cfca View commit details
    Browse the repository at this point in the history
  3. Improve wlr_drm_format documentation

    A wlroots user can easily get confused and think that `cap` refers to
    wlroots buffer capabilities, not array capacity.
    DemiMarie authored and bl4ckb0ne committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    b5d4bc3 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2021

  1. render: add wlr_renderer_init_wl_shm

    This allows compositors to initialize wl_shm without initializing
    other globals like linux-dmabuf.
    emersion authored and amshafer committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    4ade1e2 View commit details
    Browse the repository at this point in the history
  2. linux-dmabuf-v1: implement v4

    Implement a basic version of linux-dmabuf-unstable-v1 version 4.
    Only default hints are implemented.
    emersion authored and amshafer committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    2821297 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6933dd4 View commit details
    Browse the repository at this point in the history
  4. types/linux-dmabuf-v1: introduce wlr_linux_dmabuf_hints_v1

    This data structure will allow compositors to define their own
    custom hints.
    emersion authored and amshafer committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    3415c79 View commit details
    Browse the repository at this point in the history
  5. linux-dmabuf-v1: add per-surface hints

    emersion authored and amshafer committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    48a4c0b View commit details
    Browse the repository at this point in the history
  6. Rename hints -> feedback

    amshafer committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    37e5339 View commit details
    Browse the repository at this point in the history
  7. Add format table logic to linux_dmabuf

    This was changed during the latest protocol updates.
    amshafer committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    4fc559e View commit details
    Browse the repository at this point in the history