aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input
Commit message (Collapse)AuthorAge
* Implement input method keyboard grabLibravatar xdavidwu2021-03-12
|
* focus: beyond fullscreen when focused explicitlyLibravatar lbonn2021-02-25
| | | | | | | When issuing a focus command on a specific container, users expect to proceed it even if is hidden by a fullscreen window. This matches the behavior of i3.
* Automatically map built-in touchscreens/tablets to built-in panelsLibravatar Simon Ser2021-02-25
| | | | | Detect whether an output is built-in via its type. Detect whether a touchscreen or tablet tool is built-in via its ID_PATH property.
* container: Move pending state to state structLibravatar Kenny Levinsen2021-02-16
| | | | | | | | | Pending state is currently inlined directly in the container struct, while the current state is in a state struct. A side-effect of this is that it is not immediately obvious that pending double-buffered state is accessed, nor is it obvious what state is double-buffered. Instead, use the state struct for both current and pending.
* Add missing transaction commits to seatop_defaultLibravatar David962021-02-16
| | | | | | | | | Every seat_set_focus* should be followed by a transaction_commit_dirty. In cases where the focus change is followed by a seatop_begin* this is not needed, as transaction_commit_dirty is then called by the seatop_begin* function. Fixes #6034
* text_input: Add support for focusing layer-shell surfacesLibravatar Tadeo Kondrak2021-02-15
|
* text_input: Only send surrounding_text and content_type if supportedLibravatar Tadeo Kondrak2021-02-15
|
* text_input: Ignore text_input disable from unfocused windowsLibravatar Tadeo Kondrak2021-02-15
| | | | | | | Before this commit, there would be cases where focus changes from one window to another, the new window activates text_input, then the old window sends a deactivate request, making text_input unfocused completely.
* input: Commit transactions in seatop_defaultLibravatar Kenny Levinsen2021-02-15
| | | | | This is needed for focus_follows_mouse, and was accidentally omitted in the previous transaction commit shuffle.
* input: Only commit transactions when necessaryLibravatar Kenny Levinsen2021-02-14
| | | | | | | | | | | There is no need to check for transactions at the end of every user input, as the vast majority of input will not issue transactions. This implementation can also hide where changes are made without an appropriate transaction commit, as a future unrelated input would issue the commit instead. Instead, commit transactions in places where changes are made or are likely to be made.
* input/seat: Reset command handler context in seat_destroy()Libravatar Andri Yngvason2021-01-01
| | | | This fixes a dangling reference which causes a use-after-free.
* input/seat: Clean up focus_stack in seat_destroy()Libravatar Andri Yngvason2021-01-01
| | | | This fixes use-after-free when seat_destroy() has been called.
* input: Clean up input_method_relay in seat_destoy()Libravatar Andri Yngvason2021-01-01
| | | | | This fixes a crash that happens when input_method_new or text_method_new events are emitted after the seat has been freed.
* Change workspace_layout to match i3 behaviorLibravatar Ronan Pigott2020-12-20
| | | | | | | In i3, the workspace_layout command does not affect the workspace layout. Instead, new workspace level containers are wrapped in the desired layout and the workspace layout always defaults to the output orientation.
* input/cursor: unhide cursor on synthetic inputLibravatar Tudor Brindus2020-12-06
| | | | Fixes #5847.
* input/keyboard: fix Group# bindings for keyboard groupsLibravatar Brian Ashworth2020-11-12
| | | | | | The keyboard group's effective keyboard layout was never being changed due to a condition that incorrectly preventing it from being performed. The IPC event that follows the change was correctly being prevented.
* tree/container: introduce `container_is_sticky[_or_child]` functionsLibravatar Tudor Brindus2020-11-11
| | | | | | | | | | To query whether a container is sticky, checking `con->is_sticky` is insufficient. `container_is_floating_or_child` must also return true; this led to a lot of repetition. This commit introduces `container_is_sticky[_or_child]` functions, and switches all stickiness checks to use them. (Including ones where the container is already known to be floating, for consistency.)
* Add missing includes for wlr_input_device.hLibravatar Simon Ser2020-11-11
| | | | References: https://github.com/swaywm/wlroots/pull/2470
* Replace wlr_key_state with wl_keyboard_key_stateLibravatar Simon Ser2020-11-11
| | | | References: https://github.com/swaywm/wlroots/pull/2446
* input/seatop_default: consider fullscreen views to have no edgesLibravatar Tudor Brindus2020-11-05
| | | | | | | | | | | | | Previously, `find_edge` on a single fullscreen view would occasionally return an edge rather than `WLR_EDGE_NONE`. This would trigger entry into `seatop_resize_tiling`, which doesn't have meaning for a fullscreen view. The result was that the fullscreen container hitbox was considered to be that of where it'd be if it were tiling, so most clicks would not go through. Fixes #5792.
* input: fully change focus when scrolling tabs/stacksLibravatar Tudor Brindus2020-11-01
| | | | | | | | When scrolling on a tabbed/stacked container, i3 focuses its inactive-focused focused child. Sway does the same, but then resets the focus to whatever was focused previously. Ref https://github.com/i3/i3/blob/e5992eed163179f5cd2715c2c212d3d757f04b31/src/click.c#L207-L219
* commands/focus: force container warp when fulfilling `focus mode_toggle`Libravatar Tudor Brindus2020-11-01
| | | | | | | This commit switches focusing behavior to force a warp when executing `focus mode_toggle`. Fixes #5772.
* input: remove motion deltas from seatop callbacksLibravatar Tudor Brindus2020-10-31
| | | | Straightforward cleanup, they haven't been used for a while.
* hide_cursor: Add an option to hide when typingLibravatar Tamir Zahavi-Brunner2020-10-30
| | | | | Add an option for the `hide_cursor` command to hide the cursor when typing, i.e. whenever a key is pressed.
* tiling_resize: abandon resize if a sibling con diesLibravatar Ronan Pigott2020-10-20
|
* tiling_drag: emit window move ipc eventsLibravatar Ronan Pigott2020-10-18
|
* seat: use default output mapping if there is no input configLibravatar Ronan Pigott2020-10-16
|
* input/tablet: add tool_mode option to set tablet tools as relative inputLibravatar Tudor Brindus2020-10-12
| | | | Closes #4139.
* input/cursor: default tablet lens tool to relative motionLibravatar Tudor Brindus2020-10-12
| | | | | | | | It is recommended that mouse and lens cursor tool default to relative mode and all pen-like tools to absolute mode. Refs https://wayland.freedesktop.org/libinput/doc/1.11.3/tablet-support.html#tablet-relative-motion.
* Make focus_follows_mouse work when hovering a layer-shell surface on another ↵Libravatar David962020-09-26
| | | | | | output Fixes #5668
* cursor: update hide timer during config applyLibravatar Rouven Czerwinski2020-09-16
| | | | | | | | | We can't arm the timer during cursor creation since the config may not be ready yet. Instead arm the timer while applying the input configuration, by this time the configuration has been parsed and we can arm the hide timer. Fixes #5686
* cursor: arm cursor hide timer immediatelyLibravatar Rouven Czerwinski2020-09-15
| | | | | | | | | | According to the wayland docs, wayland timers are disarmed on creation. This leads to the cursor not being hidden if there is no activity after creation, since the timer is armed on activity, but not at creation. Arm the timer after creation to ensure the cursor is hidden even if there is no cursor activity after creation. Fixes #5684
* input/pointer: update cursor activity after updating button countsLibravatar Tudor Brindus2020-09-14
| | | | | | | Otherwise, Sway will not re-hide a cursor after the last button has been released. Needed alongside afa890e to fix #5679.
* input/cursor: reset event source after unhideLibravatar Rouven Czerwinski2020-09-14
| | | | | | | | Reset the event source after unhiding the cursor, to ensure that the timeout starts after showing the cursor. Also remove the open coded variant in seat_consider_warp_to_focus(). Fixes #5679
* input/libinput: remove input type property biasLibravatar Brian Ashworth2020-09-03
| | | | | | | | | | | | | | This changes it so all libinput config options are set on any device that supports it. Previously, only a subset of libinput config options were being considered depending on the input type. Instead of trying to guess which properties the device may support, attempt to set any configured property regardless of the device type. All of the functions already have early returns in them for when the device does not actually support the property. This brings the configuration side inline with describe_libinput_device for the IPC side. This change was prompted by a tablet tool showing the calibration matrix property in the IPC message, but not being able to actually change it since that property was only being considered for the touch input type.
* Fix incorrect format specifiersLibravatar Antonin Décimo2020-07-30
|
* input/cursor: don't send wl_pointer.motion event on pointer unlock warpLibravatar Tudor Brindus2020-07-15
| | | | | | | | On warping to a cursor hint, update the pointer position we track as well, so that on the next pointer rebase we don't send an unexpected synthetic motion event to clients. Fixes #5405.
* input: implement xdg_toplevel interactive resize hintsLibravatar Ronan Pigott2020-07-13
|
* config/output: don't change output state before commitLibravatar Simon Ser2020-07-10
| | | | | | | | | | | | | | | | | | | | | | | Previously, we called output_disable prior to wlr_output_commit. This mutates Sway's output state before the output commit actually succeeds. This results in Sway's state getting out-of-sync with wlroots'. An alternative fix [1] was to revert the changes made by output_disable in case of failure. This is a little complicated. Instead, this patch makes it so Sway's internal state is never changed before a successful wlr_output commit. We had two output flags: enabled and configured. However enabled was set prior to the output becoming enabled, and was used to prevent the output event handlers (specifically, the mode handler) from calling apply_output_config again (infinite loop). Rename enabled to enabling and use it exclusively for this purpose. Rename configure to enabled, because that's what it really means. [1]: https://github.com/swaywm/sway/pull/5521 Closes: https://github.com/swaywm/sway/issues/5483
* seat/dnd: support null drag icon surfacesLibravatar Nick Diego Yamane2020-07-07
| | | | | | | | | | | | | | | | | As per the Wayland spec [1]: > The icon surface is an optional (can be NULL) surface that provides an > icon to be moved around with the cursor. However, as of now Sway "start_drag" signal handler does not starts the DND session unless a non-NULL drag icons is provided. This patch fixes it by skipping handling of the drag icon if it is null. Fixes #5509 [1] https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_data_device Signed-off-by: Nick Diego Yamane <nickdiego@igalia.com>
* Replace unprintable characters in input device idLibravatar wb96882020-07-03
|
* Don't set xwayland cursor when wlr_xwayland failedLibravatar Simon Ser2020-07-02
| | | | This causes a NULL pointer dereference.
* seat: fix segfault in sway_input_method_relay_set_focusLibravatar Simon Ser2020-07-02
| | | | | | | sway_input_method_relay_set_focus was called before sway_input_method_relay_init. Closes: https://github.com/swaywm/sway/issues/5503
* seat: Refocus seat when wlr_drag is destroyedLibravatar Kenny Levinsen2020-06-30
| | | | | | | | | | | | wlr_drag installs grabs for the full duration of the drag, leading to the drag target not being focused when the drag ends. This leads to unexpected focus behavior, especially for the keyboard which requires toggling focus away and back to set. We can only fix the focus once the grabs are released, so refocus the seat when the wlr_drag destroy event is received. Closes: https://github.com/swaywm/sway/issues/5116
* input/pointer: correctly handle bindings for synthetic eventsLibravatar Tudor Brindus2020-06-25
| | | | | | This commit addresses a regression introduced in 8fa74ad. Fixes #5481.
* input/seat: don't notify keyboard grabs with NULL surface on shutdownLibravatar Tudor Brindus2020-06-19
| | | | Fixes #5469, a minor regression introduced in #5368.
* input: disable events for map_to_output devices when output not presentLibravatar Tudor Brindus2020-06-19
| | | | Fixes #3449.
* input/pointer: don't trigger pointer bindings for emulated inputLibravatar Tudor Brindus2020-06-18
| | | | | | | | | | Prior to this commit, a tablet device could trigger mouse button down bindings if the pen was pressed on a surface that didn't bind tablet handlers -- but it wouldn't if the surface did bind tablet handlers. We should expose consistent behavior to users so that they don't have to care about emulated vs. non-emulated input, so stop triggering bindings for any non-pointer devices.
* input/cursor: send idle events based off device type, not input typeLibravatar Tudor Brindus2020-06-18
| | | | | | | | Previously, a tablet or touch device could report activity as a pointer device if it went through pointer emulation. This commit refactors idle sources to be consistently reported based on the type of the device that generated an input event, and now how that input event is being processed.
* input/pointer: don't trigger pointer bindings for emulated inputLibravatar Tudor Brindus2020-06-16
| | | | | | | | | | Prior to this commit, a tablet device could trigger mouse button down bindings if the pen was pressed on a surface that didn't bind tablet handlers -- but it wouldn't if the surface did bind tablet handlers. We should expose consistent behavior to users so that they don't have to care about emulated vs. non-emulated input, so stop triggering bindings for any non-pointer devices.