aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-09-18river: refactor keyboard groups implementationIsaac Freund10-172/+179
This reduces the impact of keyboard groups on the Keyboard.zig implementation and otherwise improves consistency with patterns used elsewhere in rivers code. There are also two small changes to the riverctl interface: - keyboard-group-add-keyboard is renamed to keyboard-group-add - keyboard-group-remove is added to support removing keyboards from a group.
2022-09-12river: add keyboard groupsLeon Henrik Plickat10-31/+314
2022-08-25layer-shell: start transaction on mapIsaac Freund1-0/+1
The fact that this call is missing is a bug, as the changes made by arranging the output layers as well as changes to the focus will not be fully applied.
2022-08-19river: advertise correct version of layout protocolLeon Henrik Plickat1-1/+1
2022-08-16river-layout: add user_command_tags eventLeon Henrik Plickat4-3/+22
It is not guaranteed that the next layout_demand event after a user_command event has the same active tags (for example when there are no views visible). As an example, a user could trigger a user_command while no views are visible, then switch to a different tag set which has active views. The active tags of the previous layout_demand may also be different. Therefore it is impossible to correctly implement a layout generator which has user commands apply only to the currently active tag set, which is solved by this patch.
2022-08-15layout: only arrange on user command if layout is activeIsaac Freund1-1/+1
2022-08-11river: keep floating views within bounds when sending to outputLeon Henrik Plickat1-2/+26
2022-08-11river: fix SIGPIPE handling, cleanup fork/execveIsaac Freund3-18/+28
Installing an empty handler does not have the same effect as using SIG_IGN as the failing write syscall will not return EPIPE.
2022-08-10river: ignore SIGPIPE to avoid weird exitsshironeko1-0/+11
When river or wlroots write to a closed socket it could generate SIGPIPE causing the whole desktop to seemingly "crash" with no error log of any kind. So we ignore the SIGPIPE and just let the write fail with EPIPE to be handled normally.
2022-07-26Seat: send enter event on keyboard device creationIsaac Freund1-18/+28
Currently we don't send an enter event when a new keyboard device is created which causes issues when switching ttys. On switching away the keyboard device is destroyed and leave is sent. Currently on switching back the keyboard device is re-created but no enter event is sent before we start sending key events, which is a violation of the protocol.
2022-07-19LayoutDemand: handle too many view dimensions correctlytiosgz1-1/+4
The condition was wrong for the first extra view (0 isn't < 0), plus the counting stopped at that moment.
2022-07-18XdgPopup: fix unconstrain rect with layer surfacestiosgz1-2/+2
The used coordinates store where the layer is on the output, but we need the opposite.
2022-07-10Output: retry other modes if preferred failstiosgz1-3/+14
In cases like multiple hi-res monitors connected through a USB dock, the preferred mode can fail to work. Such an output was then ignored by river, which made it impossible to even set another mode manually. Sway has been reported to solve this issue, so let's employ their solution and fall back to another mode if possible.
2022-07-10ci: explicitly install libevdevIsaac Freund3-1/+4
This is currently pulled in transitively on void, arch, and FreeBSD which just stopped working on void due to upstream changes.
2022-07-02docs: better connect 'index' to -layout in riverctl(1)tiosgz1-3/+3
2022-07-01deps: update to latest zig-wlrootsIsaac Freund2-6/+4
This fixes the return type of Foo.fromWlrSurface() functions which can in fact return null in the edge case that the role matches but the corresponding object has already been destroyed.
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