Commit Graph

1189 Commits

Author SHA1 Message Date
Leon Henrik Plickat
5ce2ca1bc0 river: fix crash when trying to add tag rule without tag argument 2023-07-02 19:21:52 +02:00
Leon Henrik Plickat
0b142bd16b river: add tags rule 2023-06-28 15:38:32 +02:00
Leon Henrik Plickat
a98de941d0 river: change order of colums in list-rules command
This will make it easier to extend the command later for new rules
2023-06-27 10:47:44 +02:00
Leon Henrik Plickat
9b5ea39580 river: allow settings child type of RuleList 2023-06-27 10:44:28 +02:00
Isaac Freund
470eb22280
river-layout: Remove incorrect assertion
This assertion is not correct since removing transaction preemption.
2023-06-20 15:26:29 +02:00
Leon Henrik Plickat
93a567ca94
riverctl: Add error messages for failed connections 2023-06-05 20:01:27 +02:00
Isaac Freund
6e2169a149
XdgToplevel: store scene node in wlr_surface data
This was accidentally removed in 05eac54b077, which broke
SceneNodeData.fromSurface() for xdg_toplevels.

This means that thing such as xdg-activation and idle inhibit didn't
work since that commit and should work again starting from this commit.
2023-06-05 19:49:39 +02:00
Väinö Mäkelä
792d94253c
XdgToplevel: keep wlroots updated on view sizes
When sending a configure, wlroots will send the same size that was sent
on the previous configure unless a new size is set. If a client resizes
their window itself, the size wlroots has in
XdgToplevel.scheduled will be obsolete and needs to be updated by river.
2023-05-11 23:02:34 +02:00
Sage Hane
5de9bf846b editorconfig: fix typo 2023-05-02 13:37:37 +00:00
Pablo Ovelleiro Corral
b369815070
command/send-to-output: add -current-tags flag 2023-03-25 14:32:31 +01:00
tiosgz
e207a0e03a
Server: remove debug leftover 2023-03-24 16:57:36 +01:00
Isaac Freund
3865a7be7c
session-lock: fix assertion failures and clean up
The removed assertions aren't possible to guarantee due to the fact that
the lock render state is updated asynchronously as the output is
rendered.
2023-03-24 15:27:25 +01:00
Isaac Freund
eaa2f6d37e
LayerSurface: fix surfaces on multiple outputs at once
The previous commit broke handling of keyboard interactive
layer surfaces being created on multiple outputs at once.

This new approach reverts part of the logic change in the previous
commit while keeping the fix for the crash and the new assertion.
2023-03-16 15:10:52 +01:00
Isaac Freund
133b88c266
LayerSurface: handle focus when switching outputs
Currently if a layer surface is focused and the user focuses a different
output the layer surface remains focused. However, updating focus on
layer surface unmap only considers seats that have the layer surface's
output focused.

To fix this there are 3 approaches I see:

1. Unfocus all layer surfaces on the old output when switching output
focus, focus any layer surfaces on the new output.

2. Disallow switching output focus while a layer surface is focused.

3. Stop caring about output focus when determining which layer surface
should gain/lose focus.

I've taken the 3rd option here as it is significantly simpler to
implement and maintain but still feels reasonably intuitive.
2023-03-16 11:03:33 +01:00
Isaac Freund
50c6ae245f
build: work around zig 0.10.0 bug to fix CI 2023-03-15 17:34:10 +01:00
Isaac Freund
c2ce893dd0
Cursor: apply x/y change during resize on commit
This fixes issues with resizing clients that stick to a fixed aspect
ratio during resize such as mpv.
2023-03-15 17:33:16 +01:00
Isaac Freund
a679743fa0
Cursor: lock to current geometry during move/resize
This eliminates cursor jitter entirely during interactive resize.

This also fixes a bug where the xdg-toplevel resizing state was not
cleared if a resize operation was aborted due to a change in view tags
or similar.
2023-03-14 13:34:55 +01:00
Isaac Freund
9db41115a8
XdgToplevel: ensure view dimensions match geometry
Some clients (e.g. mpv) do not respond to configures by committing
buffers of the exact size requested. Instead they may commit a buffer of
a smaller size in order to maintain an aspect ratio or not commit a
buffer at all.
2023-03-14 12:30:53 +01:00
Isaac Freund
90f240355e
Cursor: fix warp on output change with no views 2023-03-14 12:07:14 +01:00
Isaac Freund
0ba65848a1
Root: separate fallback list to handle 0 outputs
Mixing views that are currently being mapped/unmapped with views that
are stashed during hotplug down to 0 outputs is error-prone and almost
certainly has a bug or two hiding currently.
2023-03-14 11:53:04 +01:00
Isaac Freund
95825b0153
Root: remove incorrect assertions in addOutput() 2023-03-14 11:41:02 +01:00
Isaac Freund
dd542b5284
Output: reinitialize output_status, cleanup
If a output is removed and added back without being destroyed this must
be reinitialized.

This commit also cleans up the Root.applyPending() calls related to
output hotplug and adds some more logging.
2023-03-14 11:39:10 +01:00
Isaac Freund
0355b654af
doc: fix typo in riverctl man page 2023-03-13 10:04:46 +01:00
Isaac Freund
e4e8eae0df
example/init: update for rules system 2023-03-12 17:26:44 +01:00
Isaac Freund
fe3c3b5246
docs: fix typo in riverctl man page 2023-03-12 17:14:57 +01:00
Isaac Freund
b2b2c9ed13
river: add rules system
This is a breaking change and replaces the previous
csd-filter-add/remove and float-filter-add/remove commands.

See the riverctl(1) man page for documentation on the new system.
2023-03-12 16:44:19 +01:00
Isaac Freund
05eac54b07
xdg-decoration: clean up implementation
We now send some protocol errors that wlroots 0.16 is missing [1].
This also allows us to access the xdg decoration from a view, which will
be necessary for some future changes.

[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4051
2023-03-10 18:49:30 +01:00
Isaac Freund
fcb184f0bd
View: add none impl tag for better safety checks 2023-03-10 14:15:15 +01:00
Isaac Freund
fc6d1cca15
xdg-shell: determine tiled state by float state
How river currently sets this isn't really in accordance with the spirit
of the protocol. It was originally done this way to get gtk3 windows to
look a little bit better with borders drawn around them. However, I've
come to believe that river shouldn't just ignore standards like this.

The right way to do things would be to either implement the
xdg-decoration protocol for gtk properly or to be pragmatic and accept
some programs are intended to be used with CSD and that's OK.
2023-03-10 10:48:54 +01:00
Isaac Freund
0752b6b9ba
example/init: Fix confusing comments
River does not currently recognize Ctrl as a modifier, only Control.
2023-03-09 23:35:06 +01:00
Isaac Freund
0de3f67898
river-status: only send layout name if changed 2023-03-09 23:14:26 +01:00
Isaac Freund
ebfa892d95
XdgToplevel: clean up wlr_surface data on destroy 2023-03-08 12:20:27 +01:00
Isaac Freund
f072d19e51
Xwayland: eliminate unneeded user data usage
This is some dead code that is left over from before the scene graph
changes.
2023-03-08 11:37:28 +01:00
Isaac Freund
9a2e0d97d7
layer-shell: apply exclusive zones in separate pass
This brings the behavior closer to what we had before the scene
graph refactor.

The main difference now is that the order has changed from background to
overlay instead of from overlay to background. This ordering seems to
make more sense in the cases I've tested and the old ordering was just
cargo-cult anyways.
2023-03-07 23:43:23 +01:00
Isaac Freund
29976e5741
Seat: fix potential assertion failure 2023-03-06 20:17:59 +01:00
Isaac Freund
684f26acac
river: improve comments on pending/inflight/current 2023-03-06 16:30:42 +01:00
Isaac Freund
05e8fbc8b9
wlr-foreign-toplevel-management: implement protocol
Well, at least as much of it as was implemented before the scene graph
refactor.
2023-03-06 12:58:54 +01:00
Isaac Freund
f21eb4d05b
Xwayland: only raise views if activated 2023-03-06 10:08:10 +01:00
Isaac Freund
b7b371cb4f
pointer-constraints: implement protocol
Now with 50% less pointer warping!

The new implementation requires the user to move the cursor into the
constraint region before the constraint is activated in order to keep
behavior more predictable.
2023-03-05 23:11:54 +01:00
Isaac Freund
1602b34f4f
Seat: use the grab aware API to clear focus
This looks to be a typo made way back in the early days of river.
2023-03-05 13:37:57 +01:00
Isaac Freund
db726718ef
Cursor: use pending position to warp during move 2023-03-05 09:44:14 +01:00
Isaac Freund
cc2b38af92
presentation-time: support protocol 2023-03-04 23:06:41 +01:00
Isaac Freund
b6ac1021ae
Server: remove headless backend
This was previously used to create a noop output, but we no longer rely
on that hack.
2023-03-04 23:02:52 +01:00
Isaac Freund
44004e2d28
SceneNodeData: allow access from wlr_surfaces
This replaces the old View.fromWlrSurface function and is more general.

This commit also moves the xdg activation request_activate listener to
Server as it has no reason to be in View.
2023-03-04 22:41:35 +01:00
Isaac Freund
ea4e589fdc
river: clean up some uneeded TODOs 2023-03-04 20:58:02 +01:00
Isaac Freund
f5f9b526a0
river: fix a few leaks 2023-03-04 20:12:37 +01:00
Isaac Freund
4d2f5bb32d
Cursor: store offset and warp cursor during move
This is more reliable since it uses absolute coordinates instead of a
relative movement which could cause the cursor position to get out of
sync with the view.

This is the same approach used for resize.
2023-03-04 19:17:18 +01:00
Isaac Freund
b4ae62cd40
View: rework configure abstraction
- Move the decision whether a configure should be tracked or not into
the xdg toplevel/xwayland code.

- Only track configures for xdg toplevels with the transaction system
if the dimensions of the view are affected.
2023-03-04 16:03:16 +01:00
Isaac Freund
915fb7ae7b
xdg-shell: honor client move/resize requests 2023-03-03 20:13:06 +01:00
Isaac Freund
c29153255c
Cursor: allow resizing from all edges
Co-authored-by: Leon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de>
2023-03-03 20:13:06 +01:00