Commit Graph

1326 Commits

Author SHA1 Message Date
8488cd9d97 Merge branch 'master' of https://codeberg.org/river/river 2025-04-17 21:25:40 +09:00
46f77f30dc 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
2025-03-29 15:44:56 +01:00
8490558b8b 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:48:09 +01:00
14f63f3099 Merge branch 'master' of https://codeberg.org/river/river 2025-02-05 15:17:43 -08:00
543697847f Xwayland: don't inherit rlimit changes from river 2025-01-07 11:00:44 -06:00
c1fc15dbc6 Merge branch 'master' of https://codeberg.org/river/river 2025-01-06 20:14:25 -08:00
6abcc68a19 river: wrap monotonic time > 2^32-1 milliseconds
Fixes: https://codeberg.org/river/river/issues/1176
2024-12-30 09:23:52 -06:00
ab879e245c Output: check scene damage before rendering
This should fix adaptive sync/VRR, which was regressed by db7de8151.
2024-12-29 16:09:44 -06:00
9f8b689f8a security-context-v1: fix assertion failure
There's a bit of subtlety I missed with the zig-wayland upgrade.
Since zig-wayland now generates its own wl_interface structs the pointer
comparison we used to do here is no longer sufficient.
2024-12-27 09:49:14 -06:00
e575485f0d deps: upgrade to latest zig-wayland 2024-12-23 14:14:35 -06:00
4fba7505f3 deps: update to latest zig-wayland 2024-12-17 17:35:16 -06:00
5ca829bd5a docs: mention key repeat defaults 2024-11-24 15:11:42 +01:00
a2a5e8f463 alpha-modifier-v1: implement protocol
Implement the alpha-modifier-v1 protocol, which allows clients to
offload alpha blending operations to the compositor.

wlroots' scene graph code takes care of updating the opacity of
wlr_scene_buffers with an associated wp_alpha_modifier_surface_v1.
2024-11-08 18:56:20 -05:00
33a69405c4 Fix riverctl.1.csd 2024-11-02 08:16:58 -07:00
5080f07724 Add cursor warp option 2024-11-02 08:00:50 -07:00
d66decb7c4 Open view relative to mouse, take 2 2024-11-01 22:08:20 -07:00
eab34c7c03 Merge branch 'master' of https://codeberg.org/river/river 2024-11-01 15:43:44 -07:00
dbe2cb72f8 Allow floating views to appear at the mouse 2024-11-01 15:43:17 -07:00
1b5dd21ee6 layer-surface: fix clip box coordinates
The clip box must be relative to the layer surface, not the output.
2024-10-24 12:07:49 +02:00
3529463569 Output: workaround wlroots headless output bug 2024-10-24 10:55:44 +02:00
2061ae2c4c Merge branch 'master' of https://codeberg.org/river/river 2024-10-21 05:37:26 -07:00
fd55f51ba1 input: support scroll button lock config 2024-10-03 11:42:21 +02:00
26f599b56b docs: fix broken repology link 2024-09-18 16:12:18 +02:00
fbb9cc0f76 build: load tablet-v2 protocol from its new location 2024-09-04 10:57:16 +00:00
55974987b6 tearing-control: fix security-context related assert 2024-08-28 11:26:35 +02:00
f82b2f5816 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.
2024-08-15 11:49:51 +02:00
066baa5753 tearing-control-v1: implement
Implement the wp-tearing-control-v1 protocol allowing window to hint
the compositor that they prefer async "tearing" page flips.

Add tearing/no-tearing rules to allow the user to manually
enabled/disable tearing for a window.

Use async "tearing" page flips when a window that should be allowed to
tear is fullscreen.

This still requires several kernel patches to work with the wlroots
atomic DRM backend. For now, either set WLR_DRM_NO_ATOMIC=1 or use a
custom kernel that includes the unmerged patches (such as CachyOS).

Closes: https://codeberg.org/river/river/issues/1094
2024-08-15 11:45:53 +02:00
db7de8151c 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.
2024-08-07 11:09:38 +02:00
f5d37f9b4d docs: clarify input device name description
The word "numerical" suggests both decimal and hexadecimal, so changed
it to decimal.
2024-07-28 14:02:04 +02:00
93863b132e Output: don't configure uninitialized layer surfaces
It is possible for a layer surface to notably delay its initial commit;
for example shotman[1] creates two layer surfaces and uses one of them
to get enough information for a screenshot and initializing the other.
River could also have sent a configure before initial commit if two
clients raced against each other.

Fixes https://codeberg.org/river/river/issues/1123

[1]:https://sr.ht/~whynothugo/shotman/
2024-07-26 07:53:42 +00:00
85a1673a9e river: attempt to recover from GPU resets 2024-07-22 16:21:15 +02:00
2cc1d1cef3 LayerSurface: minor style/naming tweaks
No functional changes
2024-07-17 11:10:02 +02:00
f27bbf03f1 LayerSurface: focus on_demand-interactive surfaces on map
This is done specifically for lxqt-runner and qterminal to work as
expected, consistently among (almost) all compositors with layer-shell.
The most prominent drawback of this is that top- and overlay-layer
status bars with on_demand interactivity also get focus on map.

See https://codeberg.org/river/river/issues/1111 for more details.
2024-07-16 21:28:01 +00:00
99ef96a389 build: update to wlroots 0.18.0 2024-07-16 14:34:40 +02:00
ccd676e5a9 completions: zsh click-method option fix
"button-areas" seems to be the argument this command expects instead of
"button-area" -- other shells also have the option as "button-areas".
2024-07-12 09:16:41 +01:00
a7411ef2a6 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.
2024-07-10 12:16:42 +02:00
1f5bf1d972 docs: mention zig build -h in readme 2024-07-09 18:26:17 +02:00
14a5609dae Merge branch 'master' of https://codeberg.org/river/river 2024-07-07 22:30:06 -07:00
4232d6b99f 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.
2024-07-02 15:03:22 +02:00
ec16f1c375 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.
2024-07-01 12:55:35 +02:00
a80e0f7322 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.
2024-07-01 12:27:16 +02:00
0997fde28e docs: tweak repology link wording in readme 2024-06-30 12:12:00 +02:00
ae7f4b8fcb 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.
2024-06-25 12:24:25 +02:00
2e09b66963 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.
2024-06-24 19:29:19 +02:00
ffb24267b8 Merge branch 'master' of https://codeberg.org/river/river 2024-06-19 13:28:50 -07:00
de3035563c 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.
2024-06-14 15:32:37 +02:00
28a14c6794 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.
2024-06-13 12:36:00 +02:00
e2f3cd8252 ci: log build summaries 2024-06-13 11:37:13 +02:00
f9201ae7cd ci: re-enable FreeBSD builds
Official FreeBSD zig tarballs have returned!

This reverts commit 7fdba05b82.
2024-06-13 11:32:38 +02:00
16c938111d ci: use mirror for zig tarball downloads
Eat Github's resources rather than the Zig Software Foundation's
resources!
2024-06-13 11:16:47 +02:00