aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-11-09river: remove dead codeIsaac Freund1-19/+0
This file has been dead since the refactor to use the wlroots scene graph deleted view_stack.zig
2023-11-08xdg-toplevel: ignore redundant move/resize requestsIsaac Freund1-2/+8
Such requests currently lead to an assertion failure. I don't know what changed in nautilus 45.0 that caused it to start doing this and I probably don't want to know.
2023-11-08rules: rename "tag" action to "tags"Isaac Freund6-85/+66
This rule action accepts and assigns a set of 32 tags represented as a 32 bit integer just like all of river's other commands handling tags. Using the singular here is potentially misleading and is also inconsistent with set-view-tags, etc. which all use the plural. Sorry about the breaking change for those who use master branch, ideally I would have caught this before merging but at least I noticed before a release. This commit also does a bit of internal refactoring/cleanup of the rules system.
2023-11-08river: add fullscreen rulepolykernel6-9/+34
This commit adds a fullscreen rule for configuring whether the view should be drawn fullscreen on start up. The actions "fullscreen" and "no-fullscreen" map to the two possible state of a view and semantically operate on the same rule list. The behavior of adding, deleting and listing rules follows that of float and ssd.
2023-11-08river: add position and dimensions rulespolykernel7-12/+104
This commit adds position and dimensions rules for configuring the initial position and dimensions of views. When a view is not matched by any position rules, it is centered in the avaliable output space matching the current behavior. If the provided position rule places the view outside of the output, the view's position is clamped to the output bounds (with respect to borders). When a view is not matched by any dimensions rules, no default dimensions is set by the server. If the provided dimensions rule exceeds the minimum or maximum width/height constraints of the view, the view's width/height is clamped to the constraints. Position and dimensions rules have no effect if a view is started fullscreen or is not floating. A view must be matched by a float rule in order for them to take effect.
2023-11-06pointer-constraints: fix assertion failureIsaac Freund1-2/+12
It is possible for the assertion in PointerConstraint.confine() to fail if a view with an active pointer constraint is, for example, resized using a keybinding such that the pointer is outside the constraint region. Handle this edge case by deactivating the constraint. The other option would be to warp the pointer to the nearest point still inside the constraint region. Deactivating the constraint is far simpler however and I don't expect this to be a UX pain point.
2023-11-03XdgToplevel: tweak fullscreen state policyIsaac Freund1-5/+2
Currently river only sends the fullscreen state to a maximum of one toplevel per output at a time and switching tags such that the fullscreen toplevel is not visible causes the fullscreen state to be removed. This may be technically correct, but it causes issues when programs like firefox trigger animations on fullscreen state change. This commit returns river's policy here to what we did back in 0.2 and leaves the xdg_toplevel fullscreen state set regardless of whether or not the toplevel is currently rendered as fullscreen or if there are other fullscreen toplevels.
2023-11-03Cursor: use inflight_mode as needed in updateState()Isaac Freund1-30/+49
This fixes possible assertion failures when quickly cancelling and starting a new move/resize. The following steps, take from the bug report, can currently reproduce the race: 1. Start with a window in tiled mode. 2. Begin resizing the window with your cursor. 3. Send the window back to tiled mode (with a keybind) and quickly begin resizing it again with your cursor.
2023-10-30riverctl(1): add a section on terminologytiosgz1-0/+15
It is not unusual to see people coming to river directly from X11, confused by some things being renamed (and by river having tags). Give them some basic help for reading the manpage and understanding our talk.
2023-10-26rivertile: eliminate an @intCast()Isaac Freund1-1/+1
It's pretty cool that the new @min() and @max() builtin semantics allow this.
2023-10-25DragIcon: set position on creationIsaac Freund3-20/+27
Currently if a drag icon is created but the cursor/touch point is not moved river will render the drag icon at 0,0 instead of the cursor/touch point location. This fixes that.
2023-10-25editorconfig: reflect state of bash completiontiosgz1-0/+4
2023-10-25completions/bash: complete input devices, fix typostiosgz1-1/+3
2023-10-25completions/fish: partial overhaultiosgz1-97/+108
Try to fix -h and -version. Remove seemingly superfluous -x everywhere, only use one -f. Use -o for options. Update input devices listing. Deduplicate some args. Try to do better for rule-add and rule-del.
2023-10-25docs: update PACKAGING.md for Zig 0.11Isaac Freund1-11/+12
2023-10-21docs: explain unknown info in output identifiersIsaac Freund1-1/+2
2023-10-19river: add outputs ruleDoclic8-23/+77
2023-10-19river: make RuleList return deleted itemsDoclic2-6/+6
2023-10-18completions/zsh: Fix incomplete input namesHugo Machet1-1/+1
Input name with ':' in it were not suggested entirely.
2023-10-18completions: Rewrite zshHugo Machet1-98/+98
- Fix some completions that never really worked correctly, e.g `riverctl input` didn't take the input name into account. Same with rule that didn't take into account glob. - Add a lot of documentation to help people adding new commands. - Add new rule-[add|del] order. - `riverctl input` now autocomplete input name from `riverctl list-inputs`
2023-10-17Cursor: use total delta for resize calculationIsaac Freund1-46/+53
This means that interactive resize speed is no longer throttled by the speed at which the client commits new buffers. Interactive resize speed is now determined entirely by how fast the pointer input device is moved by the user. This may result in more subjectively "choppy" resizes for clients that commit very slowly, but it should be less sluggish at least.
2023-10-16riverctl: rule-{add,del}: reorder parameterstiosgz4-17/+35
Previous order was (action, conditions, action argument), current is (conditions, action, action argument). The old one was an expansion of (action, conditions), which itself most likely came from the separate <action>-filter-add commands. On the other hand, the new order keeps action and its argument together and is in line with the logical flow (check conditions, apply action). On shell completions: only bash absolutely needed to be updated. fish and zsh slightly misbehave regardless of the order.
2023-10-16View: clean up after Zig updateIsaac Freund1-21/+11
2023-10-16build: update to Zig 0.11.0Isaac Freund54-359/+329
2023-09-05Cursor: keep focus_follows_cursor_target updatedtiosgz1-17/+33
This goes as close as possible to the behavior before this state was introduced (keeping the improvement which needed it, 931405ab), fixing various mis-interactions of keyboard and focus_follows_cursor focus changes. The following text is irrelevant to restoring correct basic FFC behavior and talks about less common scenarios with regards to FFC clashing with views' input region beyond their geometry, continuing the work done in 931405ab. Scenario 1: the cursor traveling along a view's border in a "dead zone", never initiating a focus change. If the focused view has an extended input region, that area has some functionality (such as client-initiated resizing); therefore it should be respected and even if another view's geometry is also under the cursor, focus shouldn't change. In case of unfocused views, it is a matter of consistency with the focused-view case. This outcome is also easier to implement, as it doesn't require any additional code. Scenario 2: *clicking* such a dead zone, i.e. extended input region (of an unfocused view). In question is not whether to focus the view (yes), but whether the focus_follows_cursor_target should be set to the view as well. Only one case seems relevant to me here, which is when ffc_target is another view whose geometry is under the cursor, but covered by this newly-focused view's input region. The most likely action following the click is resizing the newly-focused view, where a touchpad or faulty mouse could make the cursor move a bit farther after the button has been released. I believe that ffc_target shouldn't have been updated, in order to now prevent focus from skipping away. (Another variant is me, wondering why the wrong view got focused and trying to focus the right one using FFC. In that case, however, one could ask if it's river that misbehaves and whether the application is really well-integrated into the user's desktop when it provides a feature they don't desire.)
2023-08-13Root: fix inflight_layout_demands countingtiosgz1-6/+7
Not decreasing the counter caused a weird bug where disabling/removing an output (curiously, it seems to apply only to last active output being removed) would lock the user out of the session, not letting the transaction to complete (therefore hiding all views on a newly added output) and messing up focus. Fixes https://github.com/riverwm/river/issues/830
2023-08-13Root: migrate {all,active}_outputs to wl.listtiosgz8-85/+88
As discussed with ifreund on irc. This avoids extra allocation in case of all_outputs and confusion in case of active_outputs (because with the Output embedded in the Node, i thought its value was copied instead of its pointer).
2023-08-13Root: make 'fallback output empty' assertion strictertiosgz1-2/+2
2023-08-13Root: rename field outputs to active_outputstiosgz6-30/+30
Although this list only including active outputs was already documented, making this explicit in its name reduces confusion and debugging overhead.
2023-08-03river: update some commentstiosgz2-8/+9
Mostly stuff not reflecting renames, plus a few if-then comma errors i noticed.
2023-07-11river: fix spatial direction focusing / swappingLeon Henrik Plickat1-0/+1
2023-07-09river: focus-view and swap by spatial directionLeon Henrik Plickat9-172/+205
2023-07-02river: fix crash when trying to add tag rule without tag argumentLeon Henrik Plickat1-0/+1
2023-06-28river: add tags ruleLeon Henrik Plickat7-13/+54
2023-06-27river: change order of colums in list-rules commandLeon Henrik Plickat3-33/+33
This will make it easier to extend the command later for new rules
2023-06-27river: allow settings child type of RuleListLeon Henrik Plickat4-112/+127
2023-06-20river-layout: Remove incorrect assertionIsaac Freund1-1/+2
This assertion is not correct since removing transaction preemption.
2023-06-05riverctl: Add error messages for failed connectionsLeon Henrik Plickat1-2/+8
2023-06-05XdgToplevel: store scene node in wlr_surface dataIsaac Freund1-0/+1
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-05-11XdgToplevel: keep wlroots updated on view sizesVäinö Mäkelä1-1/+6
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-02editorconfig: fix typoSage Hane1-1/+1
2023-03-25command/send-to-output: add -current-tags flagPablo Ovelleiro Corral2-4/+18
2023-03-24Server: remove debug leftovertiosgz1-2/+0
2023-03-24session-lock: fix assertion failures and clean upIsaac Freund3-21/+21
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-16LayerSurface: fix surfaces on multiple outputs at onceIsaac Freund1-5/+10
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-16LayerSurface: handle focus when switching outputsIsaac Freund2-3/+1
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-15build: work around zig 0.10.0 bug to fix CIIsaac Freund1-10/+15
2023-03-15Cursor: apply x/y change during resize on commitIsaac Freund4-68/+139
This fixes issues with resizing clients that stick to a fixed aspect ratio during resize such as mpv.
2023-03-14Cursor: lock to current geometry during move/resizeIsaac Freund2-50/+47
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-14XdgToplevel: ensure view dimensions match geometryIsaac Freund2-6/+26
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.