Commit Graph
100 Commits
Author SHA1 Message Date
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
Isaac Freund 312465e0cb build: update to Zig 0.12
(cherry picked from commit 033cad47bf)
2024-05-20 12:07:52 +02:00
Isaac Freund c757e1b33e build: bump version to 0.3.2-dev 2024-05-18 17:43:46 +02:00
Isaac Freund 6a2eeba9ed bulid: bump version to 0.3.1 2024-05-18 17:09:03 +02:00
Isaac Freund a019045a16 PointerConstraint: remove overly tight assert 2
This is a second copy of the same assert that was removed in the last
commit. It should have been removed by that commit as well but was
overlooked.

(cherry picked from commit 680cb8ef69)
2024-05-18 17:07:48 +02:00
Isaac Freund 7b42c38276 PointerConstraint: remove overly tight assert
This assert is incorrect if Xwayland is enabled and an Override Redirect
window steals the keyboard focus from the parent surface.

It also seems likely to be hit if a Wayland client attempts to use a
pointer constraint on a subsurface. I don't think a pointer constraint
on a subsurface is likely to work entirely correctly and I don't know of
any Wayland clients that try such a thing. We can't let them crash river
by trying though.

(cherry picked from commit 5d1fc034bc)
2024-05-18 17:07:48 +02:00
Isaac Freund fa077d31b4 InputPopup: fix minor issues, simplify code
(cherry picked from commit c75d32c88b)
2024-05-18 13:41:28 +02:00
Isaac Freund cc5a249e9e TextInput: ignore enable requests without focus
(cherry picked from commit b35a40b9df)
2024-05-18 13:41:28 +02:00
Isaac Freund 84ec97aff2 InputPopup: fix naming
(cherry picked from commit ba6023e38a)
2024-05-18 13:41:28 +02:00
Isaac Freund 9c56eb051f Server: fix filtering of newly created globals
Fixes: https://codeberg.org/river/river/issues/1068
(cherry picked from commit b5a80c7b9b)
2024-05-18 13:41:28 +02:00
Isaac Freund cfb67b9e7a Keyboard: fix redundant leave/enter on creation
Currently if a second keyboard input device is created river will send
a wl_keyboard.leave event immediately followed by a wl_keyboard.enter
event. This serves no purpose and can confuse clients, in particular due
to fctix creating/destroying virtual keyboards on focus change.

Fixes: https://codeberg.org/river/river/issues/1062
References: https://github.com/fcitx/fcitx5/issues/1044
(cherry picked from commit 1e3ef88bd5)
2024-05-18 13:41:05 +02:00
Isaac Freund 717894b007 Cursor: don't hide while pointer constraint active
Fixes: https://codeberg.org/river/river/issues/1053
(cherry picked from commit f66eec9248)
2024-05-18 13:30:59 +02:00
Isaac Freund b2c4d38e09 XdgToplevel: update clip on geometry x/y change
Currently if a client commits a geometry with a different x/y value but
does not change the width/height we might not update the clip
coordinates of the surface tree, potentially causing part of the surface
to be unintentionally clipped off.

To fix this, check for change in geometry x/y as well as width/height on
commit if the client is not currently part of an ongoing transaction.

Firefox for example it seems may respond to a configure non-atomically
with multiple commits:

1. commit new buffer and new geometry of a new width/height.
2. commit again with the same width/height but a new geometry x/y.

I don't think this is technically a bug but it doesn't seem like the
most efficient way to do things. I think this may also cause imperfect
frames. In any case, this should no longer cause river to crop off part
of firefox's surface.

(cherry picked from commit 9bbd34a0e3)
2024-04-27 13:39:47 +02:00
Isaac Freund dbfaa05a67 XdgToplevel: don't update geometry if configure inflight
(cherry picked from commit d1dc873408)
2024-04-27 13:39:47 +02:00
Isaac Freund 822690146d build: bump version to 0.3.1-dev 2024-04-19 14:00:29 +02:00
Isaac Freund d3178ae13f build: bump version to 0.3.0 2024-04-16 14:03:17 +02:00
Isaac Freund f9e52f32bf docs: remove website url at top of readme
Codeberg lets me put this by the repository description.
2024-04-16 13:51:46 +02:00
Isaac Freund 6bae8efe01 docs: freshen up readme with text from website 2024-04-16 13:48:39 +02:00
Isaac Freund df5cb5dfe8 input: minor fixes and cleanups for scroll-factor 2024-04-16 13:26:01 +02:00
Isaac Freund 4a019142be layer-surface: close if exclusive zones too large
It seems layer-shell clients such as waybar can commit bogus exclusive
zones larger than the width/height of the output. While this client
behavior is questionable at best, it must not cause river to crash or
otherwise misbehave.

Therefore, close layer surfaces causing the usable (not exclusive zone)
area of an output to be reduced below half of the width/height.
2024-04-16 12:18:39 +02:00
Isaac Freund 70ad2af8f4 docs: update URL in man pages
Also remove the redundant URL in the footer and the redundant
"General Commands Manual" text (scdoc adds that by default based on the
section it seems).
2024-04-15 11:23:05 +02:00
Isaac Freund 14e941bae1 docs: redefine Code of Conduct scope 2024-04-09 14:18:47 +02:00
Isaac Freund 86d142aa47 logo: make readme logo bigger on small displays
The correct way to do this would be to use the max-width css attribute,
but codeberg seems to strip that when converting markdown to html.

The new value of 600em looks almost identical to 50% on large screens
and looks a lot better on small (mobile) screens.
2024-04-09 10:41:34 +02:00
Isaac Freund 7974bfdb7d docs: fix another broken link in the coc
The markdown generation of the upstream Contributor Covenant page seems
to have some issues.
2024-04-09 09:43:02 +02:00
Isaac Freund 9a04462cdf docs: fix broken link in coc 2024-04-09 09:41:38 +02:00
Isaac Freund 06c13197bb docs: add Code of Conduct 2024-04-09 08:57:17 +02:00
Isaac Freund 3e306ecfbf river: raise the file descriptor limit 2024-04-08 16:24:51 +02:00
Isaac Freund 94828474b0 View: add more assertions around destruction
This should make leaks like the one fixed by the previous commit harder
to write.
2024-04-08 15:19:12 +02:00
Isaac Freund a374c6ab84 Root: fix leak on view destroy
This leaks memory and possibly an fd currently whenever a view is
destroyed.
2024-04-08 15:02:55 +02:00
Isaac Freund b0e54c6396 Output: fix possible assertion failure on enable
Currently if we disable an output due to a wlr-output-power-management
protocol request we do not update Output.lock_render_state properly.

This is fine if the output is also re-enabled using the
wlr-output-power-management protocol but causes an assertion failure
if it is re-enabled using wlr-output-management instead.
2024-04-08 13:34:47 +02:00
Isaac Freund 3594fe501e View: fix assertion failure if focused while destroying
Also clean up this code a bit, it's no longer necessary to split these
one line functions out into separate files as Zig's conditional
compilation support has improved since these functions were originally
written.
2024-04-08 12:54:05 +02:00
Isaac Freund 93f9eb8e5e logo: use adaptive color/no background for readme
This looks nicer with dark themes. Light themes should be effectively
unchanged.
2024-04-08 12:28:46 +02:00
Isaac Freund 36d8e90a54 View: always check if current.output is null
This field being nullable at all is code smell. I think what needs to
happen here long term is for a proper separation of "window management
output" and "physical output" as concepts and integration outputs into
the transaction system.

That's a much larger change and I don't want to cause that amount of
code churn just before a release though.
2024-04-03 17:18:54 +02:00
Isaac Freund 8b8ac27c45 ci: migrate to codeberg 2024-04-01 22:28:23 +02:00
Isaac Freund 8d59622ae1 docs: fix typo in previous commit 2024-03-26 15:23:49 +01:00
Isaac Freund 1946f284d5 docs: update README stability disclaimer 2024-03-26 15:16:49 +01:00
Isaac Freund c4877de3ca logo: add an official river logo
This logo is based on original raster images designed by Karl Felix
Schewe (@kardwen on codeberg/github). I created a modified svg version
from scratch in inkscape. I've included several variations (with text,
with text and a background) for various use cases.

The versions with text use the Dongle font [1] which is released under
the OFL and therefore free for us to use in the logo without
acknowledgement according to [2].

[1]: https://github.com/yangheeryu/Dongle
[2]: https://openfontlicense.org
2024-03-26 13:24:53 +01:00
Isaac Freund 7ceed0d093 docs: update release urls for codeberg migration 2024-03-25 20:12:29 +01:00
Isaac Freund 4d0315b565 docs: update wiki url 2024-03-25 19:56:46 +01:00
Isaac Freund 19133422c1 codeberg: maybe fix issue template take 2 2024-03-25 19:45:52 +01:00
Isaac Freund 4efeb2a278 codeberg: maybe fix issue template 2024-03-25 19:43:26 +01:00
Isaac Freund b106466ad9 codeberg: add bug report issue template 2024-03-25 19:37:53 +01:00
Isaac Freund 12de175e11 command/map: add note about upstream xkbcommon fix 2024-03-24 11:46:07 +01:00
Isaac Freund ed99d7bc14 docs: migrate to codeberg
wiki and release migration are TODO
2024-03-22 16:49:28 +01:00
Isaac Freund 6491310e12 layer-shell: crop surfaces to output bounds 2024-03-20 13:23:36 +01:00
Isaac Freund 13b9d23e2f View: fix potential assertion failure on destroy
If a View is destroyed while part of a transaction we can currently hit
an assertion failure, this commit fixes it.
2024-03-18 22:33:24 +01:00
Isaac Freund f3cd98288a Root: increase transaction timeout to 100ms
This was dropped from 200ms to 50ms in 4a65af66. However 50ms seems
to be a bit too short in practice. I often hit ugly frame imperfection
do to timeouts when toggling mpv between a small floating window and
fullscreen for example, even on a relatively beefy desktop computer.

This only happens while the video is playing in mpv, not while it is
paused. I believe this is due to mpv ignoring the compositor's hints for
when to render a new frame entirely while playing a video. It instead
renders at the framerate of the video being played, even if the
compositor requests a change in size. This isn't great but seems
unlikely to change [1].

Overall, hitting 100ms timeouts subjectively doesn't feel anywhere near
as sluggish as hitting 200ms timeouts and offers better frame perfection
than 50ms timeouts in at least this one example, there are bound to be
others.

[1]: https://dudemanguy.github.io/blog/posts/2022-06-10-wayland-xorg/wayland-xorg.html
2024-03-17 22:55:43 +01:00
Isaac Freund 3f49ff9631 deps: update zig-wayland for a minor cleanup 2024-03-15 19:10:18 +01:00
Isaac Freund d64cbd2100 touch: handle cancel event, fix assertion failure
Currently we can hit an assertion failure in the putNoClobber() call in
response to the down event since we fail to handle the cancel event.

This commit fixes that issue.
2024-03-15 19:08:10 +01:00
Isaac Freund 0e7a692831 XdgToplevel: validate move/resize request serial
Currently we only support interactive move/resize with the pointer,
touch and tablet tool support are TODO.

Validate the serial here to ensure we don't start a pointer move/resize
in response to the client attempting to start a move/resize with
touch/tablet tool.

This fixes an assertion failure that the pointer's cursor is not hidden
during move/resize, which is how the issue was discovered. Another win
for assertions :)
2024-03-15 15:24:46 +01:00
Isaac Freund 1b63c463a7 security-context: implement protocol
Sensitive Wayland protocols such as wlr_screencopy and wlr_data_control
(clipboard managment) are now blocked by default inside security
contexts (e.g. flatpak 1.15.6 or later).

User configuration of the allowlist/blocklist is TODO.
2024-03-15 14:47:43 +01:00
Isaac Freund e143cdeca9 pointer-gestures: move to input manager
We definitely should not create duplicates of the global for each seat.

Not that we really support multi-seat yet, but someday.
2024-03-15 13:25:02 +01:00
Isaac Freund 451387a4a9 Server: remove all listeners on deinit() 2024-03-14 13:42:14 +01:00