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.
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.
Now with 50% less pointer warping!
The new implementation requires the user to move the cursor into the
constraint region before the constraint is activated in order to keep
behavior more predictable.
The scene_layer_surface may be destroyed before handleDestroy is called,
which means we can't rely on it to access the wlr_layer_surface in
destroyPopups().
This implementation as it stands is incomplete/buggy and will make
updating to wlr_scene more complex.
It will be reimplemented after updating to wlr_scene is complete.
Instead of stashing the active view and setting Seat.focused to the
Xwayland OR surface when a child OR surface of a currently focused
Xwayland view is given keyboard focus, keep Seat.focused set to the
Xwayland view.
Such Override Redirect surfaces are commonly used for drop down menus
and the like, and river should behave as if the parent Xwayland view
still has focus.
This ensures that the riverctl focus-view next/prev commands continue to
work as expected while a popup is open, the correct focused view title
will be sent over river status, etc.
It's also cleaner to centralize this logic in XwaylandOverrideRedirect
and keep it out of Seat.zig.
Xwayland OR menus may disappear if their parent view is deactivated. The
heuristic and ICCCM input model implemented prior, used to determine whether an
OR surface may take focus, does not cover all menus, so retaining parent view
activation works as a catch-all solution for handling unwanted OR menu focus.
This is nice simplification and allows us to abort startup if the
default xkb configuration (perhaps influenced by XKB_DEFAULT_*
environment variables) is invalid.
Currently the session lock client has no 100% safe way to know when it
is safe to suspend after requesting that the session be locked.
For a suspend to be safe the compositor must have either blanked or
rendered a lock surface on all outputs before suspending. This is
because the current framebuffer on suspend appears to be saved and
displayed again after suspend, at least on my Linux system.
If a new "locked" frame for all outputs is not rendered before suspend,
an "unlocked" frame or frames will likely be briefly displayed on resume
before the lock surfaces are rendered or the screen is blanked.
To fix this, wait until a lock surface has been rendered on all outputs,
or if that times out until all outputs have been blanked, before sending
the locked event to the client.
Resolving this race on the compositor side without protocol changes
is the most effective way to avoid this potential information leak,
regardless of which session lock client is used.
Warp the cursor to the center of the focused view if the cursor is not
in the bounding box of that view already. This helps the user to keep
track of their cursor when they mostly use the keyboard and the cursor
becomes hidden most of the time, also helps trackpad/trackpoint users.
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.
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.
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>
- 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.
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.
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`.
I thought this should be fine as river won't yield to the event loop
when Seat.deinit() is called before the wlroots seat is destroyed, but
a segfault on exit has been reported with a stack trace mentioning
wlr_seat_destroy(). Let's hope this clears that up.