aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-06-24Xwayland: fix View.fromWlrSurface for OR surfacesIsaac Freund2-1/+3
2022-06-23deps: update to latest zig-wlrootsIsaac Freund2-1/+1
This fixes a nasty ABI bug that could cause river to crash when hotplugging down to 0 outputs.
2022-06-22Cursor: implement initial touch supportIsaac Freund3-38/+134
Still TODO are: - Touch support for drags - Mapping input devices to outputs (necessary for good multi-monitor touch support) Co-authored-by: Daan Vanoverloop <daan@vanoverloop.xyz>
2022-06-22Xwayland: restrict OR focus changes based on ICCCM input modelZakariyya Von Forslun2-2/+6
Some popup menus are not covered by the `overrideRedirectWantsFocus()` heuristic (e.g. in IntelliJ IDEA), so before focusing an OR window, its input model should also be checked to ensure that it is able to take input focus. This appears to fix the popup menus in IntelliJ IDEA, which would otherwise disappear immediately due to unwanted focus.
2022-06-21Seat: refactor InputDevice handlingIsaac Freund8-194/+205
- The lifetimes of the Keyboard and Switch structs are now directly tied to the corresponding InputDevice, which has become a field of those structs. - Seat capabilities are now properly updated on removing a keyboard. These changes align with input device refactoring in upstream wlroots which will make updating to easier 0.16.0.
2022-06-20InputDevice: use "switch" in input device namesIsaac Freund1-2/+7
Currently we use "switch_device" because that's what the enum variant happens to be named in zig-wlroots so that it doesn't conflict with the switch keyword. This however wasn't really thought through and "switch" makes more sense to expose to the user.
2022-06-20InputDevice: move to separate fileIsaac Freund3-53/+77
2022-06-17example/init: don't use execIsaac Freund1-2/+2
This causes far too much unnecessary confusion for people new to shell scripting and is fairly pointless anyways.
2022-06-09Cursor: fix focus for Xwayland override redirect windowsZakariyya Von Forslun1-3/+2
Setting focus on button click for override redirect windows did not consider whether the window actually wants focus.
2022-06-06river: error out if default init is not executableLeon Henrik Plickat1-0/+6
2022-06-03build: don't scan xdg-outputIsaac Freund1-3/+1
This was used for the river-options protocol implementation in riverctl and is no longer needed since the river options protocol got removed.
2022-06-03Cursor: revive 'always' focus-follows-cursor modeIsaac Freund6-6/+12
This was removed a while back because it was buggy and I didn't know of anyone using it. Since refactoring it is now trivial to implement and I know of at least one person using it, so I don't mind reviving it.
2022-06-02river-status: only send mode event if client bound version 3Isaac Freund2-3/+8
2022-06-01river-status: add mode event to seat statusIsaac Freund10-27/+49
This allows clients such as a status bar to display the currently active mode.
2022-05-30Xwayland: Rename XwaylandUnmanaged to XwaylandOverrideRedirectIsaac Freund7-44/+43
2022-05-29Seat: avoid leaking eaten keys to client on focustiosgz3-9/+47
Until now, Seat.setFocusRaw sent all pressed keys to the client, including ones that should be eaten. (Try e.g. changing focus to a nested wlroots compositor with a terminal open to easily see it.) However, only filtering out the eaten keys is not enough; they were eaten only once all mappings had been executed. Therefore, the original function had to be split into one looking up mappings and another executing them.
2022-05-29Keyboard: eat key release event for mappingstiosgz2-6/+62
Until now, only the event (press/release) for which a mapping was present got eaten, and the other was passed to the client. From this commit, a press mapping eats both events and a release mapping eats nothing (and a press+release combo eats both). This fixes behavior of some clients that do not make a difference between press and release (e.g. Firefox with a fullscreen video exiting fullscreen even on an Esc release event).
2022-05-29ci: fix xbps invocationIsaac Freund1-1/+1
2022-05-29Xwayland: add handling of override redirect listenersZakariyya Von Forslun2-0/+4
Adding the set_override_redirect listener on creation and removing it on destruction was missed when implementing override redirect state change handling.
2022-05-29View: refactor initializationIsaac Freund5-52/+63
This anytype parameter is a wart that's been around for far too long.
2022-05-29Xwayland: handle override redirect state changesIsaac Freund4-13/+84
2022-05-29cursor: fix Xwayland unmanaged surfaceAt coordinatesZakariyya Von Forslun1-1/+1
The x and y coordinates for unmanaged Xwayland views were reversed in the fullscreen branch of the surfaceAt() function.
2022-05-29xwayland-unmanaged: handle focus on map/cursor buttonZakariyya Von Forslun3-7/+33
This implements keyboard focus on map for unmanaged Xwayland views using wlroot's heuristic approach as well as keyboard focus on cursor button click.
2022-05-24example/init: fix typosJan Evers1-2/+2
2022-05-22docs: add note on example init file to PACKAGING.mdIsaac Freund1-0/+6
2022-05-22docs: expand on -Dcpu in PACKAGING.mdIsaac Freund1-1/+11
2022-05-22docs: create PACKAGING.mdIsaac Freund2-0/+131
2022-05-22build: add -Dstrip and -Dpie build optionsIsaac Freund1-0/+9
2022-05-20Output: remove overzealous assertIsaac Freund1-2/+0
If running river with WLR_BACKENDS=headless, every output is headless not just the noop output.
2022-05-16build: follow semantic versioning for -dev versionsIsaac Freund1-6/+15
The new version format is 0.2.0-dev.76+d1cf95b which is compliant to the semantic versioning 2.0.0 spec and sorts better than the old format.
2022-05-16layer-shell: fix overflow if desired size exceeds output boundsIsaac Freund1-2/+2
2022-05-15Mapping: Do not translate keys with xkbPeter Kaplan1-26/+11
When checking keys for matching mappings, previously we did two checks: 1. Keysyms translated by xkb. 2. Raw keysyms This commit removes the first check, so only the second is checked. We're doing this because of strange behavior that xkb shows for some layouts and keys. When pressing `Shift Space` on some layouts (Swedish among others), xkb reports `Shift` as consumed. This leads to the case that we cannot distinguish between `Space` and `Shift Space` presses when doing a correct translation with xkb.
2022-05-11deps: update to latest zig-waylandIsaac Freund4-4/+29
2022-05-11idle-inhibit: implement protocoldfangx5-0/+111
2022-05-01ci: make wget output non verboseIsaac Freund4-4/+4
This still prints errors, but doesn't print progress bars or other superfluous information.
2022-04-30Switch: register destroy listenertiosgz1-2/+3
2022-04-30input: fix typo in natural-scrollJackson Abascal1-1/+1
2022-04-27command/map: layout-pinned mappingsPeter Kaplan9-55/+130
e.g. `riverctl map -layout 0 normal Super Y spawn foot` When this mapping is checked against a pressed key, layout 0 will be used to translate the pressed key instead of the currently active layout. The number denotes to an index of the layouts set with `XKB_DEFAULT_LAYOUT`.
2022-04-20completions: fish: new completions for the ‘hide-cursor’ commandDaniel Eklöf1-0/+8
2022-04-20completions: bash: new completions for the ‘hide-cursor’ commandDaniel Eklöf1-0/+9
2022-04-20completions: zsh: new completions for the ‘hide-cursor’ commandDaniel Eklöf1-0/+33
2022-04-19Cursor: Don't passthrough() on update if hiddenIsaac Freund1-0/+4
Currently when the surface under the hidden cursor changes, we passthrough() which results in the cursor being made visible and giving pointer focus to the surface under the cursor if any. Obviously this is not desirable as the cursor is supposed to remain hidden until moved. This added check prevents this.
2022-04-14command/hide-cursor: fix crash on missing optionPeter Kaplan1-0/+1
2022-04-14Cursor: Add a hide-cursor commandDuncan Overbruck6-0/+122
From the riverctl.1 man page: *hide-cursor* *timeout* _timeout_ Hide the cursor if it wasn't moved in the last _timeout_ milliseconds until it is moved again. The default value is 0, which disables automatically hiding the cursor. Show the cursor again on any movement. *hide-cursor* *when-typing* *enabled*|*disabled* Hide the cursor when pressing any non-modifier key. Show the cursor again on any movement.
2022-04-14input: add map-switch/unmap-switch commandsPeter Kaplan11-4/+344
This allows running a command on a laptop's lid being opened/closed or a tablet's button/switch being pressed/toggled.
2022-03-28layer-shell: fix overflow with large bottom marginIsaac Freund1-4/+8
2022-03-06ci: Fix builds manifestsHugo Machet3-3/+3
Remove `.git` suffix from river repo in `sources` section as the suffix make the ci only clone the repo. Without the suffix the ci checkout the correct commit to build river. We don't need to remove the suffix from others sources as cloning the repo and checkout the tag version we want is enough.
2022-03-05layer-shell: allow surfaces larger than the outputIsaac Freund1-22/+2
The motivation for this change is to simplify the implementation and remove a massive footgun that is currently present and causing UB/crashes. If a layer surface is destroyed in arrangeLayers() then the code in LayerSurface.handleCommit() after the arrangeLayers() call accesses free'd memory. This is of course possible to fix, but it's far simpler to loosen up the protocol implementation a bit. The new implementation is also in line with what sway and the new wlroots layer shell helper do and is perfectly valid according to the protocol.
2022-03-05docs: fix typo in river(1) man pageLeonardo Gibrowski Faé1-1/+1
2022-03-02view: stop enforcing custom minimum sizetiosgz4-24/+8
I have encountered a crash (failing assert) if a view specified a fixed size less than this minimum, and according to ifreund this behavior was planned to be removed, anyway.