Commit Graph

786 Commits

Author SHA1 Message Date
37d9d6e725 Switch: eliminate "self" naming convention 2024-03-14 13:04:41 +01:00
0131d4670d SwitchMapping: eliminate "self" naming convention 2024-03-14 13:02:38 +01:00
82a40725f9 Control: eliminate "self" naming convention 2024-03-14 13:01:49 +01:00
3077074329 Mode: eliminate "self" naming convention 2024-03-14 13:00:15 +01:00
b9dde3c49b LayoutDemand: eliminate "self" naming convention 2024-03-14 12:59:42 +01:00
c3cee0b91f PointerMapping: eliminate "self" naming convention 2024-03-14 12:58:50 +01:00
278865065b StatusManager: eliminate "self" naming convention 2024-03-14 12:57:23 +01:00
1d8bca24ae SeatStatus: eliminate "self" naming convention 2024-03-14 12:55:54 +01:00
4a259d322b InputConfig: eliminate "self" naming convention 2024-03-14 12:53:09 +01:00
b65e4f6b17 idle-inhibit: fix naming, eliminate "self" naming convention
Also add missing copyright headers
2024-03-14 12:51:34 +01:00
b0d4610999 LayoutManager: eliminate "self" naming convention 2024-03-14 12:40:26 +01:00
b7c53ceda7 Config: eliminate "self" naming convention 2024-03-14 12:40:13 +01:00
6c3f851464 Keyboard: eliminate "self" naming convention 2024-03-14 12:35:21 +01:00
f02d26c533 InputManager: eliminate "self" naming convention 2024-03-14 12:34:28 +01:00
693a2b0dda XwaylandOverrideRedirect: eliminate "self" naming convention 2024-03-14 12:29:49 +01:00
28f30b2571 Mapping: eliminate "self" naming convention 2024-03-14 12:22:15 +01:00
904b623b84 XwaylandView: eliminate "self" naming convention 2024-03-14 12:21:21 +01:00
0e2cac08df XdgToplevel: eliminate "self" naming convention 2024-03-14 12:19:36 +01:00
2eb2a13284 Cursor: eliminate "self" naming convention 2024-03-14 12:08:24 +01:00
99a99b72e7 View: eliminate "self" naming convention 2024-03-14 12:07:27 +01:00
d8f041c96f Output: eliminate "self" naming convention 2024-03-14 12:06:33 +01:00
267aa9a9b5 Seat: eliminate "self" naming convention 2024-03-14 12:05:36 +01:00
8a9b07ae4b Root: eliminate "self" naming convention 2024-03-14 12:04:15 +01:00
aadb92dc0b Layout: eliminate "self" naming convention 2024-03-14 12:02:32 +01:00
dabf7e9e97 Server: clean up initialization
This ended up uncovering a latent bug in the IdleInhibitorManager
initialization code, not sure how that ever worked.
2024-03-14 11:55:23 +01:00
4e48d68485 View: restore to previous output on reconnect 2024-03-14 11:07:15 +01:00
fecfa89a9a View: fix SSD desync on consecutive timeouts
If multiple consecutive transaction timeouts occur it is possible for
the SSD borders to become temporarily desynchronized with the size of
the rendered surface.

This is especially noticeable during interactive resize of mpv.

For details on cause/fix, see the new comment in the code.
2024-03-13 15:57:01 +01:00
b0dc5f7294 View: improve transaction timeout handling
This fixes a possible assertion failure in Cursor.updateState() when
trying to start move/resize of a xdg toplevel with the timed_out or
timed_out_acked configure_state.

This also generally improves the UX of transaction timeouts as all
state except for the size change is now applied immediately.
2024-03-13 12:28:08 +01:00
c474be1537 build: require wlroots version 0.17.2
This fixes a crash that users have hit fairly often in the wild using
Xwayland and allows us to remove an ugly workaround for another issue.
2024-03-11 19:14:37 +01:00
49a779b24d tablet-v2: implement tablet tool support
There is not any pointer emulation for tablet tool input. This means
that only clients implementing the tablet-v2 protocol will be able to
process tablet tool input.

Tablet pad support is TODO
2024-03-11 15:05:42 +01:00
ac655593f3 View: remove faulty assertion
This assertion does not consider that a view may be visible on an output
despite no view on that output having focus due to a differnt output
currently having focus.

I don't see any clean way to fix the assert, so just remove it.
2024-03-09 13:47:36 +01:00
4a65af667e Root: reduce transaction timeout to 50ms
The current value of 200ms is too long and makes river feel very slow
when it it hit due to an application being very slow/frozen.

The new timeout of 50ms seems to be rarely hit in practice even on
slower hardware such as my old Thinkpad x220. When it is hit the system
feels much more responsive than when the 200ms timeout is hitdespite the
guilty application window potentially being visible in the wrong
location/size a bit longer.
2024-03-08 12:21:02 +01:00
f803ca6274 View: clean up attach-mode code, add assert 2024-03-08 11:56:34 +01:00
26210b2be5 View: Add attachRelative function
This is used for the above/below attach-modes introduced in d71bebc.

Also remove redundant focusedIndex function in Output.PendingState.
2024-03-08 11:56:34 +01:00
d71bebc032 command/attach-modes: above and below options 2024-03-05 17:53:16 +01:00
60f4cafad0 river: only expose xwayland_shell_v1 to Xwayland
This is a private protocol only intended for the Xwayland client.
2024-03-02 17:37:04 +01:00
0eacde7d01 deps: update to latest zig-wayland and zig-wlroots 2024-03-02 17:36:47 +01:00
12e6833f31 linux-dmabuf: disable per-surface feedback
It seems like the wlr_scene implementation of sending per-surface
feedback is a bit too spammy and can lead to resource exhaustion in
clients in at least some reported cases.
2024-02-27 17:10:27 +01:00
0605ce507e Root: fix auto-layout output coordinates
Outputs using the wlr_output_layout auto-layout feature may have their
coordinates update any time an output is added/removed to the layout or
the position of another output in the layout is set.

River currently doesn't keep the scene node coordinates of such outputs
in sync with their position in the output layout, which leads to bugs
with e.g. the cursor not working properly for such outputs.
2024-02-25 14:37:34 +01:00
60b06a6741 output-management: fix output destroy handling
Currently we update output-management clients based on changes in the
wlr_output_layout struct. However, this is obviously wrong on closer
inspection due to the fact that not all outputs are tracked by the
wlr_output_layout at all times. I think this aproach was originally
cargo-culted from some other output-management implementation and it
needs to go.

Luckily, the solution is quite simple since the only way to configure
outputs using river is through the wlr-output-management protocol. This
means we need to send a new configuration to the output-management
client in 3 cases:

1. An output is created
2. An output is destroyed
3. A wlr-output-management config from a client is applied
2024-02-25 13:42:58 +01:00
f2b6893b00 InputConfig: code style cleanups 2024-02-23 12:22:42 +01:00
0cb7c49cc3 command/input: add map-to-output 2024-02-23 12:22:42 +01:00
95da9b5875 XdgToplevel: work around buggy clients
Unfortunately, clients in the wild sometimes get the
configure/ack_configure/commit sequence wrong, committing the configured
surface with a size different than the one they ack'd only to later in
separate commit adpat the surface size to that requested by the
compositor.

Improve river's handling of such buggy clients to keep river's ssd
borders and internal state consistent with whatever the clients actually
commit regardless of the correctness of the clients. Log a shame message
for such clients to make me feel better about working around their bugs.
2024-02-22 10:24:36 +01:00
9b2d99fa79 rules: fix assertion failure
If a view that is currently being destroyed is matched by a newly added
rule river crashes due to an assertion failure.

Fix this and add another assertion to make this precondition more
visible to the users of RuleList.match().
2024-02-21 13:37:39 +01:00
53c09be846 Root: fix crash on deinit() 2024-02-20 23:14:12 +01:00
a04c18819b Root: fix crash on output disable
If there is a transaction inflight when an output is disabled then we
must call View.commitTransaction() for any views evacuated from the
disabled output to ensure transaction state remains consistent.

Root.commitTransaction() will not call View.commitTransaction()
for these evacuated views as their output is no longer around.
2024-02-20 23:14:12 +01:00
fa5a1e5da0 XdgToplevel: handle timed out state in configure()
If a new transaction is started that calls configure() on an xdg
toplevel with a timed_out/timed_out_acked configure_state we currently
leave the configure_state untouched if no new configure is needed.

This can cause an assertion failure in View.commitTransaction() if the
xdg toplevel still hasn't acked/committed by the time the new
transaction completes.

To fix this, update the configure_state as necessary.
2024-02-20 23:14:12 +01:00
46323b4a5b InputConfig: simplify libinput API usage
All of these API calls checking if the device supports a given option
and checking if the value would be changed are effectively useless.

A quick peek inside the libinput source code shows us that all of these
"setter" functions validate their arguments and return an error if they
are invalid.

Since we don't do anything with the information of whether or not a
config option has been changed or if a config option is even supported
for a given device, all these apply() functions can be simplified to a
single libinput function call.
2024-02-20 11:31:06 +01:00
1d40e5a9ab InputConfig: Implement disable while trackpointing 2024-02-20 00:21:15 +01:00
bf7b9d15dd Root: trival code cleanup in deactivateOutput() 2024-02-19 23:21:08 +01:00