Commit Graph
100 Commits
Author SHA1 Message Date
Isaac Freund a955ae21e5 build: update to Zig 0.16 2026-04-29 13:22:40 +02:00
Isaac Freund ea4774c686 Server: actually reuse image capture sources
These are currently leaked until the window is closed.
2026-04-03 09:41:57 +02:00
Isaac Freund a608f8c65f build: bump version to 0.3.16-dev 2026-03-31 10:28:14 +02:00
Isaac Freund 6aa6993936 build: bump version to 0.3.15 2026-03-31 10:27:58 +02:00
Isaac Freund ae00b8c8c7 build: bump zig-wlroots version to tagged release 2026-03-31 10:27:43 +02:00
Isaac Freund ed1055497c Server: listen for foreign toplevel capture request 2026-03-30 10:17:51 +02:00
Isaac Freund ceb50e8c88 Server: implement color management protocols
Thank you wlroots!
2026-03-29 19:42:53 +02:00
Isaac Freund 20957917ca cursor-shape: implement version 2 2026-03-29 18:26:43 +02:00
Isaac Freund 94463c4de2 Server: implement wl_fixes 2026-03-29 18:26:21 +02:00
Isaac Freund f1230e8ec9 InputRelay: adapt to wlroots breaking change
This wlroots breaking change wasn't mentioned in the changelog :/

Fixes a crash when doing pretty much anything with an input method.
2026-03-28 11:03:42 +01:00
Isaac Freund 47b64bda73 build: update to wlroots 0.20 2026-03-27 18:50:21 +01:00
Isaac Freund 5885fb79db river: support wl_shm version 2
This was a typo
2026-01-08 19:14:22 +00:00
Isaac Freund 21142a8f7c build: bump version to 0.3.15-dev 2026-01-07 04:39:16 +00:00
Isaac Freund 1787792560 build: bump version to 0.3.14 2026-01-07 04:37:34 +00:00
Isaac Freund a46c0df7ed Server: fix wlroots assertion failure on GPU reset 2026-01-06 21:00:44 +00:00
Isaac Freund df131f9a9d LayerSurface: don't configure in response to unmap
We should wait until the next "initial commit" before
sending a configure after a layer surface unmaps itself.
2025-12-20 18:40:30 +00:00
Isaac Freund d38d4105c4 docs: update wiki link 2025-12-18 23:37:34 +00:00
Isaac Freund be722b2a3f docs: fix typo in README 2025-12-10 20:24:22 +01:00
Isaac Freund 9c42ed788a build: bump version to 0.3.14-dev 2025-10-03 11:36:58 +02:00
Isaac Freund 3ef7b69112 build: bump version to 0.3.13 2025-10-03 11:35:50 +02:00
Isaac Freund 165871e0fc command: fix possible crash on focus
If the currently focused view has been moved to a different output but
the transaction has not yet been completed, we can hit unreachable code
in this function.

thread 1073 panic: reached unreachable code
/home/pkaplan/Software/river/river/command/view_operations.zig:100:21: 0x11752d6 in getTarget (river)
                    unreachable;
                    ^
/home/pkaplan/Software/river/river/command/view_operations.zig:46:22: 0x1146f36 in focusView (river)
    if (try getTarget(
                     ^
/home/pkaplan/Software/river/river/command.zig:144:16: 0x11124e3 in run (river)
    try impl_fn(seat, args, out);
               ^
/home/pkaplan/Software/river/river/Seat.zig:447:16: 0x10eb00f in runCommand (river)
    command.run(seat, args, &out) catch |err| {
               ^
/home/pkaplan/Software/river/river/Seat.zig:423:24: 0x1110350 in handleMapping (river)
        seat.runCommand(mapping.command_args);
                       ^
/home/pkaplan/Software/river/river/Keyboard.zig:213:47: 0x10e83b8 in wrapper (river)
        if (keyboard.device.seat.handleMapping(keycode, modifiers, released, xkb_state)) {
                                              ^
???:?:?: 0x7d8f73aa051d in ??? (libwayland-server.so.0)
Unwind information for `libwayland-server.so.0:0x7d8f73aa051d` was not available, trace may be incomplete

???:?:?: 0x7d8f739fecc7 in ??? (libwlroots-0.18.so)
???:?:?: 0x7d8f739d0dbb in ??? (libwlroots-0.18.so)
???:?:?: 0x7d8f73aa2111 in ??? (libwayland-server.so.0)
???:?:?: 0x7d8f73aa41f6 in ??? (libwayland-server.so.0)
/home/pkaplan/Software/river/river/main.zig:139:25: 0x10715dd in main (river)
    server.wl_server.run();
                        ^
/usr/lib/zig/std/start.zig:524:37: 0x107083e in main (river)
            const result = root.main() catch |err| {
                                    ^
???:?:?: 0x7d8f736b06b4 in ??? (libc.so.6)
???:?:?: 0x7d8f736b0768 in ??? (libc.so.6)
???:?:?: 0x1070354 in ??? (???)
2025-10-03 11:28:19 +02:00
Isaac Freund 633f4e2733 river: remove dead code 2025-10-03 11:28:01 +02:00
Isaac Freund 170cac310d linux-dmabuf: disable fine-grained feedback again
Despite the better debouncing in wlroots 0.19, this is still causing
problems. In particular, certain clients (mostly Xwayland games it
seems) have a bad interaction with this additional feedback, possibly
related to the cursor buffer.

The reported symptoms are significant framerate drops and stuttering on
pointer input.

Probably there's a wlroots bug here at fault but I don't have the
resources to fix it myself currently and would rather not force river
users to suffer.

Setting WLR_SCENE_DISABLE_DIRECT_SCANOUT=1 isn't sufficient to solve
these problems either, as wlr_scene still sends enough extra feedback
to trigger the problems.

Closes: https://codeberg.org/river/river/issues/1277
2025-09-02 10:52:57 +02:00
Isaac Freund c18ed4aae1 river: fix logging to non-pipe
Since the Zig 0.15 upgrade, if stderr is redirected to a file, river
writes every log message to the beginning of the file, overwriting the
previous message. This commit fixes that and also switches to the nicer
new std.debug API for stderr logging.
2025-09-02 09:46:46 +02:00
Isaac Freund f0c7f57d36 LayerSurface: fix crash on bad exclusive zone
River closes layer surfaces with an unreasonably large exclusive zone.
However, due to unfortunate/awkward code structure, this currently
may cause a use-after-free on mapping layer surface.
2025-09-01 09:55:49 +02:00
Isaac Freund d412c9cdd1 doc: tweak README formatting 2025-08-30 19:23:45 +02:00
Isaac Freund e5c7d75dcc build: bump version to 0.3.13-dev 2025-08-30 19:01:32 +02:00
Isaac Freund 8e4f3f6800 build: bump version to 0.3.12 2025-08-30 19:01:32 +02:00
Isaac Freund 50d5108d1f ci: rename to river-classic 2025-08-30 19:01:32 +02:00
Isaac Freund 1168a3f47a doc: rename to river-classic 2025-08-30 18:56:31 +02:00
Isaac Freund 265461162f build: rename to river-classic 2025-08-30 18:56:31 +02:00
Isaac Freund 7bc761306e Cursor: clear pointer focus on hide
This line seems to have been removed by accident while fixing a
different unrelated bug.

Fixes: f482b9ddaa
2025-08-30 18:08:24 +02:00
Isaac Freund 88a8c45ac0 river: run 0.15 zig fmt 2025-08-22 15:11:50 +02:00
Isaac Freund d72408df18 build: update to Zig 0.15 2025-08-22 15:09:07 +02:00
Isaac Freund 63542fdf3e build: bump zig-wlroots version
This version includes a fix for a regression introduced with the wlroots
0.19 upgrade.
2025-07-10 14:55:38 +02:00
Isaac Freund b8ec02796f build: bump version to 0.3.12-dev 2025-07-01 09:40:25 +02:00
Isaac Freund 0898a06a96 build: bump version to 0.3.11 2025-07-01 09:37:56 +02:00
Isaac Freund d2520301cd build: switch to zig-wlroots tag 2025-07-01 09:36:30 +02:00
Isaac Freund d08c170571 Seat: ignore virtual keyboards until keymap set
The wlr-virtual-keyboard-v1 protocol fails to make keyboard creation
atomic. There is nothing a client can do with a virtual keyboard that
has no keymap except for destroy it, so we can completely ignore them
until a keymap is set.

This fixes a regression with fcitx caused by river sending the null
keymap of a new virtual keyboard to fcitx.
2025-06-30 12:57:06 +02:00
Isaac Freund fe759d2d8a Keyboard: don't add virtual keyboards to group
Also don't set their keymap, the client handles that.

This is the first step towards fixing a regression with fcitx5.
2025-06-30 12:56:51 +02:00
Isaac Freund fcf8b1e442 Cursor: fix formatting
This is a behavior change in zig 0.14
2025-06-26 11:01:19 +02:00
Isaac Freund ed85b4401e build: bump version to 0.3.11-dev 2025-06-18 14:14:46 +02:00
Isaac Freund 6af8369624 build: bump version to 0.3.10 2025-06-18 14:06:52 +02:00
Isaac Freund 7fc7b570f0 View: workaround wlr_box_intersect() quirk 2025-06-18 13:46:17 +02:00
Isaac Freund 6385d71c37 XwaylandView: remove set_decorations listener on unmap 2025-06-18 12:26:46 +02:00
Isaac Freund c111fc9905 river: drop wl_drm support
Looks like other compositors have completely dropped this by now.
2025-06-18 12:22:17 +02:00
Isaac Freund bbb62ac8d8 linux-drm-syncobj: implement protocol 2025-06-18 12:22:17 +02:00
Isaac Freund 15736c57d7 linux-dmabuf: re-enable per-surface feedback
This was disabled due to being too spammy in the past. Since wlr_scene
now debounces per-surface feedback it should be fine to re-enable this.
2025-06-18 12:22:17 +02:00
Isaac Freund 037314823e build: update to wlroots 0.19 2025-06-18 12:22:17 +02:00
Isaac Freund ecd2a396d3 Seat: put all keyboards in a single group
Deprecate and ignore the riverctl commands for creating explicit
keyboard groups.

In my mind, the only reason to have more than one keyboard group is if
different keyboard devices are assigned different keymaps or repeat
rates. River does not currently allow such things to be configured
however.

When river eventually makes it possible to configure different keymaps
and repeat rates per keyboard device, there is no reason we can't 100%
automatically group keyboards based on the keymap/repeat rate.

Exposing this keyboard group abstraction to the user is just bad UX.

Failing to group keyboards automatically also creates confusing/buggy
behavior for the user if the hardware, for example, exposes some of the
the XF86 buttons on a laptop as a separate keyboard device from the main
keyboard. Creating keybindings for these XF86 buttons that use modifiers
doesn't work by default, but there's no reason it shouldn't just work.

Closes: https://codeberg.org/river/river/issues/1138

(cherry picked from commit 46f77f30dc)
2025-03-29 15:54:45 +01:00
Isaac Freund f482b9ddaa Cursor: restore previous image on unhide
If client A has an xdg_popup open and the user moves the cursor over a
surface of client B and waits for the cursor to be hidden after a
timeout, the cursor will not be shown on movement until the (invisible)
cursor is moved back into a surface of client A or somewhere the
compositor is responsible for rendering the cursor.

This is due to the (flawed) xdg popup grab interface of wlroots which
prevents wlr_seat_pointer_notify_enter() from sending events to clients
other than the one with the active xdg popup.

Closes: https://codeberg.org/river/river/issues/1192
2025-03-16 13:37:57 +01:00
Isaac Freund f1904d4e6f build: bump version to 0.3.10-dev 2025-03-16 12:14:07 +01:00
Isaac Freund bdc3c0ccf9 build: bump version to 0.3.9 2025-03-10 08:20:10 +01:00
Isaac Freund 60f954c2b0 build: eliminate duplicate version string
There is now a single source of truth for river's version. It is no
longer possible for the versions in build.zig and build.zig.zon to get
out of sync as build.zig now parses the version from build.zig.zon.
2025-03-10 08:17:17 +01:00
Isaac Freund 8f4a746da0 security-context: fix assertion failure
This regression was caused by turning my brain off a bit too much during
the zig 0.14 upgrade.
2025-03-10 07:55:56 +01:00
Isaac Freund 00ab4910e0 build: bump version to 0.3.9-dev 2025-03-07 12:52:50 +01:00
Isaac Freund 23ad9aa412 build: bump version to 0.3.8 2025-03-07 12:50:31 +01:00
Isaac Freund 933701d7f9 build: update to zig 0.14.0 2025-03-07 12:44:28 +01:00
Isaac Freund 0eb478b06a Xwayland: don't inherit rlimit changes from river
(cherry picked from commit 543697847f)
2025-03-02 10:21:00 +01:00
Isaac Freund 295bbb241a build: bump version to 0.3.8-dev 2025-01-04 11:39:28 -06:00
Isaac Freund 189cf6e68b build: bump version to 0.3.7 2025-01-04 11:35:17 -06:00
Isaac Freund 840eacae62 river: wrap monotonic time > 2^32-1 milliseconds
Fixes: https://codeberg.org/river/river/issues/1176
(cherry picked from commit 6abcc68a19)
2025-01-04 11:34:16 -06:00
Isaac Freund a5f94268e6 Output: check scene damage before rendering
This should fix adaptive sync/VRR, which was regressed by db7de8151.

(cherry picked from commit ab879e245c)
2025-01-04 11:34:06 -06:00
Isaac Freund 6254211a26 build: bump version to 0.3.7-dev 2024-12-09 15:07:58 +01:00
Isaac Freund 4b24287da7 build: bump version to 0.3.6 2024-12-09 15:01:53 +01:00
Isaac Freund 59f0fb2882 docs: mention key repeat defaults
(cherry picked from commit 5ca829bd5a)
2024-12-09 15:01:03 +01:00
Isaac Freund f0798f7536 layer-surface: fix clip box coordinates
The clip box must be relative to the layer surface, not the output.

(cherry picked from commit 1b5dd21ee6)
2024-12-09 15:00:08 +01:00
Isaac Freund 08cc135ebd Output: workaround wlroots headless output bug
(cherry picked from commit 3529463569)
2024-12-09 15:00:02 +01:00
Isaac Freund fd58a84f18 docs: fix broken repology link
(cherry picked from commit 26f599b56b)
2024-12-09 14:59:45 +01:00
Isaac Freund a50573082b tearing-control: fix security-context related assert
(cherry picked from commit 55974987b6)
2024-12-09 14:59:34 +01:00
Isaac Freund c691396448 tearing-control: minor cleanups/style improvements
This commit also tweaks the riverctl interface to make the global
allow-tearing option apply only to tearing-control-v1 hints from
clients. The global option no longer affects tearing/no-tearing rules
explicitly created by the user.

(cherry picked from commit f82b2f5816)
2024-12-09 14:59:22 +01:00
Isaac Freund 993bdf96d1 Root: simplify scene tree reparenting
Making these reparent() calls unconditional avoids inconsistent state.
It's also simpler and less error-prone and the wlroots function returns
immediately if the parent doesn't change anyways.

(cherry picked from commit db7de8151c)
2024-12-09 14:49:55 +01:00
Isaac Freund dcc8e5cb9d build: bump version to 0.3.6-dev 2024-07-22 17:25:15 +02:00
Isaac Freund 0e1b1862ca build: bump version to 0.3.5 2024-07-22 17:21:01 +02:00
Isaac Freund 510268d83a river: attempt to recover from GPU resets
(cherry picked from commit 85a1673a9e)
2024-07-22 17:20:08 +02:00
Isaac Freund 62576d792c LayerSurface: minor style/naming tweaks
No functional changes

(cherry picked from commit 2cc1d1cef3)
2024-07-22 17:20:02 +02:00
Isaac Freund eb32deaf76 build: update to wlroots 0.18.0
(cherry picked from commit 99ef96a389)
2024-07-22 17:19:44 +02:00
Isaac Freund dc0d8112a6 build: bump version to 0.3.5-dev 2024-07-10 12:58:47 +02:00
Isaac Freund 4f39ce79e9 build: bump version to 0.3.4 2024-07-10 12:55:32 +02:00
Isaac Freund 6849176e25 PointerConstraint: fix assertion failure
The assertion in PointerConstraint.confine() can currently still be
triggered if the input region of a surface is changed and the pointer is
moved outside of the new intersection of input region and constraint
region before PointerConstraint.updateState() is called.

This can happen, for example, when a client is made non-fullscreen at
the same time as the pointer is moved across the boundary of the new,
post-fullscreen, input region. If the pointer crosses the boundary
before the transaction completes and updateState() is called, the
assertion in PointerConstraint.confine() will fail.

To fix this, listen for the surface commit event rather than the
set_region event to handle possible deactivation on region changes.

(cherry picked from commit a7411ef2a6)
2024-07-10 12:55:02 +02:00
Isaac Freund eab893c481 layer-shell: fix on_demand keyboard focus
Currently keyboard focus is stolen from layer surfaces with
on_demand keyboard interactivity any time Root.applyPending() is called.

This commit fixes the behavior to only steal focus when explicitly
focusing a different window/layer surface.

(cherry picked from commit 4232d6b99f)
2024-07-10 12:55:02 +02:00
Isaac Freund cf63d16846 XdgPopup: send configure after initial commit
Currently we send the first configure for xdg popups before the popup
has made its initial commit. This is incorrect according to the protocol
and may confuse clients.

(cherry picked from commit ec16f1c375)
2024-07-10 12:55:02 +02:00
Isaac Freund 6e0c103705 Output: fix Wayland backend support
The wlroots Wayland backend does not support gamma LUT application and
will currently fail to render anything if river commits a gamma LUT.

To fix this, test the state when applying a gamma LUT and fall back to a
state with no gamma LUT set if that fails.

This problem was revealed by 2e09b66 which flags gamma as dirty on all
outputs when they are enabled.

(cherry picked from commit a80e0f7322)
2024-07-10 12:55:02 +02:00
Isaac Freund 5cfa1fc8f5 docs: tweak repology link wording in readme
(cherry picked from commit 0997fde28e)
2024-07-10 12:29:14 +02:00
Isaac Freund 6564db22df Xwayland: fix unsound cast
The X11 protocol uses 16 bit integers for width/height but we use
32 bit integers everywhere else in river. Make sure that values outside
the range of a 16 bit integer don't cause river to crash with an
assertion failure.

I think that coordinates outside the range of a 16 bit integer could
theoretically be reasonable with tiled high resolution displays in the
future. I doubt they ever get used in practice today but at the same
time we can't allow an errant layout generator to crash river.

(cherry picked from commit ae7f4b8fcb)
2024-07-10 12:29:06 +02:00
Isaac Freund b85da67886 Output: flag gamma as dirty on enable
We can end up with stale gamma settings if we don't re-check the
current gamma settings for the output on enable.

(cherry picked from commit 2e09b66963)
2024-07-10 12:28:57 +02:00
Isaac Freund 99b31c39f3 input: apply map-to-output on output activation
Currently a map-to-output input config setting loses effect when an
output is disabled and re-enabled for example.

(cherry picked from commit de3035563c)
2024-07-10 12:28:49 +02:00
Isaac Freund 36cdbbc087 SceneNodeData: fix fromSurface() use after free
We must clean up the user data of the wlr_surface for layer surfaces and
lock surfaces as fromSurface() may be called (e.g. by the idle inhibit
implementation) after the scene node has been destroyed but before the
wlr_surface is destroyed.

(cherry picked from commit 28a14c6794)
2024-07-10 12:28:44 +02:00
Isaac Freund 4653a7730e ci: log build summaries
(cherry picked from commit e2f3cd8252)
2024-07-10 12:28:33 +02:00
Isaac Freund f577cb5f2e ci: re-enable FreeBSD builds
Official FreeBSD zig tarballs have returned!

This reverts commit 7fdba05b82.

(cherry picked from commit f9201ae7cd)
2024-07-10 12:28:23 +02:00
Isaac Freund 77699aa0ba ci: use mirror for zig tarball downloads
Eat Github's resources rather than the Zig Software Foundation's
resources!

(cherry picked from commit 16c938111d)
2024-07-10 12:28:17 +02:00
Isaac Freund 64e2555505 build: bump version to 0.3.4-dev 2024-06-07 14:16:32 +02:00
Isaac Freund 1e65e652c2 build: bump version to 0.3.3 2024-06-07 14:11:31 +02:00
Isaac Freund a17270721e build: update to Zig 0.13.0
(cherry picked from commit 8da69699e9)
2024-06-07 14:10:24 +02:00
Isaac Freund 914f5fae20 ci: cleanup messy tar invocations
(cherry picked from commit c5b1d1de4e)
2024-06-07 14:10:24 +02:00
Isaac Freund 5cd22edb58 build: bump version to 0.3.3-dev 2024-05-20 12:17:38 +02:00
Isaac Freund 3ff620fae3 build: bump version to 0.3.2 2024-05-20 12:14:13 +02:00
Isaac Freund 25675e4fcb ci: drop FreeBSD CI for now
There is no FreeBSD tarball from ziglang.org and FreeBSD itself has not
yet updated their Zig package to 0.12.0. This commit should be reverted
when a good way is found to obtain Zig 0.12.0 for the FreeBSD CI.

(cherry picked from commit 7fdba05b82)
2024-05-20 12:13:18 +02:00
Isaac Freund b1bac96731 build: switch to the Zig package manager
No more git submodules!

(cherry picked from commit 958f8798b6)
2024-05-20 12:13:18 +02:00
Isaac Freund 9cbd66f543 build: add -Dno-llvm build option
(cherry picked from commit 045ee7bd25)
2024-05-20 12:07:52 +02:00