aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-07-25river: add custom wlroots log handlerIsaac Freund3-1/+54
This makes river's log output more consistent and will allow filtering by the wlroots scope in the future.
2021-07-24river: simplify log levels exposed to the userIsaac Freund2-22/+57
2021-07-24docs: fix inconsistent capitalizationIsaac Freund1-1/+1
2021-07-24docs: add -help and -version options to man pagesIsaac Freund3-2/+22
2021-07-24common: standardize on -help optionIsaac Freund5-31/+60
Also: - Check for -help option *before* unknown options - Use common flags parsing code for riverctl - Add usage text to riverctl
2021-07-24common: remove support for positional argumentsIsaac Freund5-185/+161
This is currently unused and I don't like the approach anymore regardless. If/when we need positional arguments (probably when implementing the upcoming river-control protocol in rivertile) they should be handled separately from flags. This commit also improves the CLI error reporting to always print the usage string if invalid arguments were passed.
2021-07-24river: use common CLI arg parsing codeIsaac Freund4-48/+42
This makes river's main() function quite a bit cleaner.
2021-07-24Add -version flag to river, riverctl and rivertilenovakane4-1/+41
2021-07-24layout: cleanup in progress layout demand on destroyIsaac Freund1-6/+7
This fixes an issue where a layout client that crashed during a layout demand caused river to enter invalid state and potentially soft-lock.
2021-07-24river: fix crash on parsing empty string as colorIsaac Freund1-1/+1
2021-07-24cursor: fix logic in Cursor.updateState()Isaac Freund1-3/+8
The previous commit re-introduced a bug fixed by a3c65713 which caused the pointer enter event not to be sent until moving the pointer when switching tag focus or otherwise manipulating the window manager caused the cursor to end up over a new surface.
2021-07-23cursor: avoid sending unnecessary pointer motion eventsIsaac Freund4-25/+22
If the current Cursor.maybeResetState() function is called while in passthrough mode, it will send a pointer motion event. This is unnecessary as we have already sent the same pointer motion event at least once. Also refactor the code slightly and improve naming.
2021-07-23river: destroy backend before Root.deinit()Isaac Freund1-0/+2
Handling output destroy now requires the wlr_output_layout to still be around, as we need it to properly handle cursor state. In order to make sure that all outputs are destroyed before the wlr_output_layout is, simply destroy the backend before calling Root.deinit().
2021-07-23cursor: add missing maybeResetState() callsiteIsaac Freund3-5/+7
This function needs to be called whenever pending state is made current, which includes when views not tracked by the transaction system commit.
2021-07-23cursor: allow commands to override cursor operationsIsaac Freund5-23/+3
Now that we properly handle state changes during cursor operations, blocking these commands if the target view is the target of a cursor operation is unnecessary complexity. It is also inconsistent as we don't block changing the tags of the view.
2021-07-23cursor: remove surfaceAt() parametersIsaac Freund1-7/+8
We always pass the current cursor position, so this is a nice simplification.
2021-07-23cursor: refactor surfaceAt() to return parentIsaac Freund1-64/+128
This allows us to properly handle e.g. clicking on a xdg popup of a view that is not currently focused by focusing that xdg popup's parent view.
2021-07-23render: sync with Cursor.surfaceAt(), draw all view popupsIsaac Freund4-51/+67
This was slightly out of sync with Cursor.surfaceAt() which did not fullscreen or xwayland unmanaged views properly. Also simplify things and improve correctness by always rendering all xdg popups. A view losing focus does not always mean that all popups will be destroyed.
2021-07-23cursor: reset state if needed on transaction commitLeon Henrik Plickat3-0/+41
A transaction may move the current target of a cursor action to a non-visible tag, make it fullscreen, or otherwise change things such that the current cursor state no longer makes sense. To handle this, check if we should reset cursor state every time a transaction is committed.
2021-07-22river-layout: make minor copyediting fixesIsaac Freund1-2/+2
2021-07-21river: make spawn command take only one argumentIsaac Freund3-19/+17
Currently the spawn command takes any number of arguments and naively joins them together with spaces before passing them as the single argument of `/bin/sh -c`. This however produces unexpected results as soon as shell quoting gets involved in the arguments passed to spawn. For example, running riverctl spawn foo "bar baz" will execute `/bin/sh -c "foo bar baz"`, unexpectedly splitting bar and baz into separate arguments. To avoid this confusion, make the spawn command take only a single argument, forcing the user to quote properly to spawn multi-argument commands.
2021-07-21contrib: update layout.c for river-layout-v3Leon Henrik Plickat1-103/+187
2021-07-21rivertile: simplify commandsIsaac Freund3-53/+53
Instead of having separate commands for modifying/setting a value, use the presence of a +/- sign to indicate modification.
2021-07-20completions: Update for river-layout-v3novakane3-7/+4
2021-07-20river-layout: update to v3Isaac Freund11-436/+321
- Remove advertise_view and advertise_done events. Using the information provided by these for any purpose would make the layout far less predictable. Futhermore, in the months this has been available for use, to my knowledge nobody has actually used it for anything useful. - Replace the set/mod layout value events with a single user_command event. This simplifies the protocol and is more flexible for clients. - Add a layout_name argument to the commit request. This name is an arbitrary, user-facing string that might, for example, be displayed by a status bar. This was present in early drafts of the protocol, but was removed in favor of river-options. Since river-options itself has since been removed and this feature is nice to have, re-add it. - Rename main factor to main ratio in rivertile. The "factor" name was just legacy from dwm, "ratio" is much more accurate.
2021-07-20river: remove opacity commandIsaac Freund13-240/+6
This code is complex and increases maintenance burden but doesn't add any functionality, only eye-candy. Futhermore, neither I nor any of the core contributors use it. There may be a place in river for such eye-candy down the line, in which case this code could be revived. Currently river is early enough in its development that our focus should be on core functionality instead.
2021-07-20docs: improve formatting consistencyIsaac Freund2-5/+5
2021-07-19Fix typo s/ouput/output/ in function nameAlexander Taylor1-3/+3
2021-07-17docs: mention man pages before wikiIsaac Freund1-1/+2
Don't want people getting the idea that the wiki is more important. The man pages are the only official documentation.
2021-07-17docs: simplify READMEIsaac Freund1-14/+5
2021-07-17river: remove system /etc dir from init search pathsIsaac Freund4-56/+38
A true "default" config doesn't make sense for river. Everyone who uses river seriously will customize their init script. Futhermore, the current behavior of embedding the install path of the default system config in the river binary is complex and prone to breaking.
2021-07-15river: add focus-previous-tags commandViktor Nagy7-0/+30
2021-07-15command: make args type 0-terminatedIsaac Freund26-77/+67
Since we often need to pass these args back C code, keeping the 0 byte around saves some allocations.
2021-07-14view: fix typo causing UB on resizing xwayland viewsIsaac Freund1-1/+1
2021-07-14xdg-shell: set resizing state during interactive resizeIsaac Freund3-13/+36
2021-07-12config: use hash sets for filters, clean up codeIsaac Freund5-98/+77
2021-07-12river: make CSD-filters apply to existing viewsLeon Henrik Plickat4-6/+62
2021-07-12river: add commands to remove filter entriesLeon Henrik Plickat3-18/+52
2021-07-07README: add a link to the wikinovakane1-1/+5
2021-07-02completions: typoSteef Hegeman1-1/+1
focus-follows-cursor instead of focus-follow-cursor
2021-06-30doc: remove dead wiki link from readmeIsaac Freund1-3/+0
river is now in nixpkgs so this page and the link are undeeded.
2021-06-27render: @panic() if CLOCK_MONOTONIC is not supportedIsaac Freund1-1/+1
Making this unreachable and invoking illegal behavior is incorrect.
2021-06-26completions: add set-cursor-warp for zsh/fishIsaac Freund2-2/+5
2021-06-26completions: Add bash completion for set-cursor-warp commandsLeon Henrik Plickat1-0/+2
2021-06-26cursor: add option to warp on output changeLeon Henrik Plickat5-2/+48
On output change, if the cursor is not already on the newly focused output, it will now be warped to its center. The check is necessary, since focusing outputs with the pointer will be implemented in the future.
2021-06-24Revert "build: assert wlroots version at comptime"Isaac Freund2-8/+0
zig-wlroots now has this assert built in This reverts commit 3392b21aa8982c1a9d5bf25307830a4294e5ae4c.
2021-06-24build: assert wlroots version at comptimeIsaac Freund2-0/+8
This will prevent people compiling river against the wrong wlroots version and wondering why it crashes.
2021-06-23ci: build wlroots from sourceIsaac Freund1-8/+26
2021-06-23code: update to wlroots 0.14.0Isaac Freund7-21/+17
2021-06-23Add spacial output operationsLeon Henrik Plickat5-124/+106
List based output operations are tedious for complex output layouts.