aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-09-06river: Allow floating based on window titlesBen Fiedler5-38/+71
This extends the `float-filter-add` command to allow matching on window titles as well, using a `float-filter-add kind pattern` syntax. The following kinds are supported: * `title`, which matches window titles * `app-id`, which matches app ids Only exact matches are considered. As an example following configuration floats all windows with the title 'asdf with spaces'. riverctl float-filter-add title 'asdf with spaces'
2021-08-19river: implement xdg-activation-v1novakane18-6/+104
- add a new "urgent" border color - add a new event to river-status-unstable-v1 Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
2021-08-18docs: default keyboard mapping mode is "normal"Keith Hubbard1-2/+2
2021-08-15command: support repeating keyboard mappingsKeith Hubbard9-22/+92
Repeating mappings are created using the -repeat option to the map command: % riverctl map normal $mod+Mod1 K -repeat move up 10 - repeating is only supported for key press (not -release) mappings - unlike -release, -repeat does not create distinct mappings: mapping a key with -repeat will replace an existing bare mapping and vice-versa Resolves #306
2021-08-12river-status: fix output status destructionIsaac Freund2-2/+10
There was a use-after-free if the Output was destroyed first, and the memory of the output status was leaked.
2021-08-12output: simplify layer shell handling on destroyIsaac Freund1-9/+7
No need for noop output hacks here, wlr.LayerSurfaceV1.close() synchronously emits the unmap signal if the layer surface is mapped.
2021-08-12layer-shell: ignore commits on closed layer surfaceIsaac Freund1-0/+3
2021-08-10seat: always add view to focus stack on mapIsaac Freund5-41/+31
Currently if a view is mapped while some other view is fullscreen, it will not be added to the focus stack, which means that if the fullscreen view is then closed the view which was not added to the focus stack will not be focused. To fix this, always add views to the focus stack on map.
2021-08-09config: fix leak of default layout namespaceIsaac Freund1-0/+3
2021-08-09Xwayland: fix possible use-after-free on unmapIsaac Freund1-2/+2
The view.unmap() call may synchronously destroy the view, which makes the the code removing listeners which is currently run after view.unmap() access free'd memory. To fix this, simply change the order of the calls to match that of XdgToplevel.handleUnmap().
2021-08-07render: draw borders before rendering viewsKeith Hubbard1-4/+4
Menus, tooltips, etc. can extend beyond a view's borders. Render views after their borders so floating content appears on top. Unfocused floating content can still be obscured by views higher in the stack and the focused view.
2021-08-02river: fix crash on disabling all outputsIsaac Freund1-8/+10
If using the on-output-change cursor warp option river currently crashes when the last real output is disabled as the noop output used as a fallback is not present in the output layout.
2021-08-02river-layout: fix typo in protocolIsaac Freund1-3/+3
2021-07-31util: remove unused functionIsaac Freund1-10/+0
2021-07-29completions: Remove strict in focus-follows-cursornovakane3-3/+3
2021-07-29cursor: remove strict focus-follows-cursor modeIsaac Freund3-8/+3
This is pretty much unusable after recent improvements to the cursor code, and was totally broken causing a stack overflow as soon as the cursor was moved over any surface until the previous commit. Furthermore, none of the core contributors or people active on IRC seem to use it.
2021-07-29cursor: fix crash if focus-follows-cursor is setIsaac Freund1-3/+5
Currently we hit a stack overflow as we do not check if the target view already has keyboard focus before calling Seat.focus() in Cursor.passthrough(). To fix this, simply add this check.
2021-07-28build: Use pkg-config to handle river protocolsnovakane1-1/+20
2021-07-28river: properly teardown surface treeIsaac Freund5-45/+95
When an xdg toplevel, layer surface, etc is destroyed, it is not guaranteed that all the children in the surface tree have already been destroyed. If there are still children around, destroying the root of the tree would leave dangling pointers. To fix this, destroy all children when destroying any node in the tree.
2021-07-28output: fix debug log on tag changeIsaac Freund2-8/+6
2021-07-27docs: fix typo in rivertile man pageRafael Escobar1-1/+1
2021-07-26config: change color format to 0xRRGGBBAAIsaac Freund5-12/+19
The current format of #RRGGBBAA is problematic as # starts a comment in POSIX compliant shells, requiring escaping/quoting and increasing complexity. This is a breaking change.
2021-07-26docs: Wayland should always be capitalizedIsaac Freund2-5/+5
This matches the style used on https://wayland.freedesktop.org/
2021-07-25view: arrange when exiting fullscreen to layoutIsaac Freund3-26/+20
This arrange is actually required because the post_fullscreen box might not hold the correct dimensions if the view was made fullscreen while a transaction was already in progress.
2021-07-25view: ensure saved buffers are always droppedIsaac Freund1-0/+5
Currently if a view is moved from layout to fullscreen while a transaction involving that view is in progress the saved buffers are not dropped, which causes stale state to be rendered.
2021-07-25layout: assert output state matches layout appliedIsaac Freund1-2/+3
This is guaranteed to already be set to the layout being committed. It is set either when a client binds a new layout object or when the user changes the layout namespace in use.
2021-07-25build: install river-layout-v3 to $PREFIX/share/riverIsaac Freund1-12/+5
This makes it easier for other projects (i.e. everyone's layout generators) to depend on the protocol xml without needing to vendor it. The river-layout-v3 protocol should remain stable for the forseeable future, hopefully forever. On the other hand, the current river-control-unstable-v1 and river-status-unstable-v1 protocols will be replaced as soon as we have time to implement better versions. Therefore, let's not encourage usage of the protocols we intend to remove.
2021-07-25build: remove example river-status clientIsaac Freund2-112/+0
This is out of date and currently doesn't compile. It also doesn't really belong in the repository IMO, except maybe in the contrib folder.
2021-07-25river: improve new layer surface log formattingIsaac Freund1-3/+3
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.