aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
Commit message (Collapse)AuthorAge
* input: Rename WLR_INPUT_DEVICE_TABLET_TOOL to WLR_INPUT_DEVICE_TABLETLibravatar Luofan Chen2024-03-01
| | | | | | | wlroots has changed the naming, causing the following build errors when building: error: ‘WLR_INPUT_DEVICE_TABLET_TOOL’ undeclared
* Convert to new pointer enumsLibravatar Simon Ser2024-02-28
| | | | References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4575
* Define _POSIX_C_SOURCE globallyLibravatar Simon Ser2024-02-23
| | | | See discussion in https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4555
* Drop unnecessary includes from sway/server.hLibravatar Simon Ser2024-02-15
|
* layer_shell: Handle popups through popup descriptorLibravatar Alexander Orzechowski2024-02-12
| | | | | | | | We tried to synchronize layer shell popups with the parent layer shell on commits, but this is subtly wrong because we would only update the position for one layer shell that was committed, but not any other layer that might be affected. By moving handling to the scene descriptor we can iterate all popups and ensure they are synchronized.
* xdg_shell: Extract struct for popup descriptorLibravatar Alexander Orzechowski2024-02-12
|
* scene_graph: Port xwaylandLibravatar Alexander Orzechowski2024-01-18
|
* scene_graph: Port xdg_shellLibravatar Alexander Orzechowski2024-01-18
|
* scene_graph: Port layer_shellLibravatar Alexander Orzechowski2024-01-18
|
* input: Query scene graph for relevant surface/node intersectionsLibravatar Alexander Orzechowski2024-01-18
|
* scene_graph: Port ext_session_v1Libravatar Alexander Orzechowski2024-01-18
|
* scene_graph: Port seat drag iconsLibravatar Alexander Orzechowski2024-01-18
|
* desktop: Rename layers to shell_layersLibravatar Alexander Orzechowski2024-01-18
| | | | | This code will be deleted later, but for the time being rename it so it doesn't conflict with future properties.
* Check wlr_pointer_constraint_v1_state.cursor_hint.enabledLibravatar Simon Ser2023-12-25
| | | | | | | Update for a wlroots breaking change which resets the committed mask. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4478
* Drop support for KDE's idle protocolLibravatar Simon Ser2023-10-05
| | | | We support the standard idle-notify protocol since Sway 1.8.
* chore: chase wlroots xdg-surface role reworkLibravatar Kirill Primak2023-08-21
|
* Add support for cursor-shape-v1Libravatar Simon Ser2023-07-24
| | | | References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4106
* input: Move wlr_pointer_gestures_v1 to sway_input_managerLibravatar Mark Bolhuis2023-06-26
| | | | | | | | On multi-seat configurations a zwp_pointer_gestures_v1 global was created for every seat. Instead, create the global once in the input manager, to be shared across all seats.
* Use "default" XCursor instead of "left_ptr"Libravatar Simon Ser2023-06-25
| | | | | "left_ptr" is the legacy XCursor name. "default" is the cursor spec name.
* Use wlr_cursor_unset_image()Libravatar Simon Ser2023-06-19
| | | | | | A bit cleaner. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4209
* Use wlr_cursor_set_xcursor()Libravatar Simon Ser2023-06-19
| | | | | | wlr_xcursor_manager_set_cursor_image() is deprecated. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4170
* Add support for touch cancel eventsLibravatar hrdl2023-05-04
|
* Use format_str() throughoutLibravatar Simon Ser2023-04-14
|
* Implement seatop_touchLibravatar Stacy Harper2023-02-20
| | | | | | | | | | Atm we got issue with the touch position sent to the clients. While holding contact, leaving the initial container will continue to send motion event to the client but with the new local position from the new container. This seatop goal is to send the position of the touch event, relatively to the initial container layout position.
* Convert to *_try_from_wlr_surface()Libravatar Simon Ser2023-02-02
| | | | References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3991
* Fix pointer events for ext-session-lock surfacesLibravatar Simon Ser2023-01-18
| | | | | We were never sending any pointer event to ext-session-lock surfaces.
* Fix indentation in surface_is_xdg_popup()Libravatar Simon Ser2023-01-18
|
* Improve tablet tool button handling.Libravatar John Chadwick2023-01-07
| | | | | | | | | | | | | | This change allows the tablet tool button to be used for floating mod resize. In addition, it attempts to ensure that tablet tool events are consistent such that tablet v2 events and pointer events will never be interleaved, and such that the tool buttons count will never fall out of sync and cause tool button emulation to break. Some of this logic is similar to what is done for tablet tool tip, but not quite identical, because of the complication that we have to deal with multiple inputs that can overlap eachother. Fixes #7036.
* warp_to_constraint_cursor_hint: Handle NULL viewLibravatar Alexander Orzechowski2023-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This might be the wrong fix, but the crash is happening because the ->data field on an xwayland surface is NULL. A NULL data field is normal for unmanaged surfaces, however it seems clients can do weird things: They can create a cursor lock on a regular xwayland surface then make it unmanaged by calling override_redirect. In this case, the xwayland server should destroy the cursor lock, which is does, but does so in the wrong order making it try to dereference a NULL pointer after sway has acknowledged its new unmanaged status. ``` (gdb) bt full 0 0x000055fd91934861 in warp_to_constraint_cursor_hint (cursor=0x55fd93486c00) at ../sway/input/cursor.c:1243 sy = 605 lx = 6.9527431433545762e-310 sx = 1272 view = 0x0 con = 0x7ffd1cdfe400 ly = -6.949595189996421e+59 constraint = 0x55fd93e7faa0 1 0x000055fd91934976 in handle_constraint_destroy (listener=0x55fd93f0fd58, data=0x55fd93e7faa0) at ../sway/input/cursor.c:1266 sway_constraint = 0x55fd93f0fd30 constraint = 0x55fd93e7faa0 cursor = 0x55fd93486c00 2 0x00007fda8275bf6e in wl_signal_emit_mutable () at /usr/lib/libwayland-server.so.0 3 0x00007fda82e57016 in pointer_constraint_destroy (constraint=0x55fd93e7faa0) at ../subprojects/wlroots/types/wlr_pointer_constraints_v1.c:49 4 0x00007fda82e570dc in pointer_constraint_destroy_resource (resource=0x55fd933cf8f0) at ../subprojects/wlroots/types/wlr_pointer_constraints_v1.c:66 constraint = 0x55fd93e7faa0 5 0x00007fda8275d8ba in () at /usr/lib/libwayland-server.so.0 6 0x00007fda8275f6a9 in wl_resource_destroy () at /usr/lib/libwayland-server.so.0 7 0x00007fda82e56fb3 in resource_destroy (client=0x55fd93ea52e0, resource=0x55fd933cf8f0) at ../subprojects/wlroots/types/wlr_pointer_constraints_v1.c:39 8 0x00007fda81d8f4f6 in () at /usr/lib/libffi.so.8 9 0x00007fda81d8bf5e in () at /usr/lib/libffi.so.8 10 0x00007fda81d8eb73 in ffi_call () at /usr/lib/libffi.so.8 11 0x00007fda8275aada in () at /usr/lib/libwayland-server.so.0 12 0x00007fda8275f01c in () at /usr/lib/libwayland-server.so.0 13 0x00007fda8275d9e2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0 14 0x00007fda8275e197 in wl_display_run () at /usr/lib/libwayland-server.so.0 15 0x000055fd919264d3 in server_run (server=0x55fd919a3a80 <server>) at ../sway/server.c:320 16 0x000055fd91925457 in main (argc=1, argv=0x7ffd1cdfed98) at ../sway/main.c:411 verbose = false debug = false validate = false allow_unsupported_gpu = false config_path = 0x0 c = -1 ```
* Use keyboard_state.focused_surface directlyLibravatar Ferdinand Schober2022-10-09
|
* check for NULLLibravatar Ferdinand Schober2022-10-09
|
* allow pointer_constraints on layer_shell surfacesLibravatar Ferdinand Schober2022-10-09
|
* Remove access to wlr_input_device unionLibravatar Simon Ser2022-06-22
| | | | | References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3626 Closes: https://github.com/swaywm/sway/issues/7077
* sway: add bindgesture commandLibravatar Florian Franzen2022-05-30
| | | | Co-authored-by: Michael Weiser <michael.weiser@gmx.de>
* sway/input: follow up wlroots input device events renamingLibravatar Simon Zeni2022-03-17
|
* sway/input/cursor: take device mm size from wlr_tabletLibravatar Simon Zeni2022-03-17
|
* input/cursor: pass through pointer hold gesturesLibravatar Tudor Brindus2022-01-22
| | | | | This just follows swaywm/wlroots#3047, so `wl_pointer_gestures_v1` clients can be notified of these events.
* input/cursor: treat swipe begin as idle activity tooLibravatar Tudor Brindus2022-01-17
| | | | Accidentally overlooked in fd53f80.
* input/cursor: count pointer gestures as idle activityLibravatar Tudor Brindus2022-01-17
| | | | Fixes https://github.com/swaywm/sway/issues/6765.
* fix cursor input for layer-shell surfacesLibravatar Rasmus Moorats2021-10-26
| | | | | | | previously, fullscreen global containers would grab cursor input even if a shell-layer surface was on top of it related issue: https://github.com/swaywm/sway/issues/6501
* use node_is_viewLibravatar siikamiika2021-10-10
|
* Fix wl_pointer.frame not sent on touch emulationLibravatar Simon Ser2021-07-26
| | | | | | | | | | | | When emulating touch, the simulating_pointer_from_touch field is set to true. It's switched back to false when a touch_up event is received. However we need to ensure we always send a wl_pointer.frame event following a group of other wl_pointer events. Since a touch_frame event is always guaranteed to come after a group of touch events, unset simulating_pointer_from_touch in the touch_frame handler instead of the touch_up handler. Add a new field to know whether the touch_frame handler should stop emulation.
* Add support for touch frame eventsLibravatar Simon Ser2021-07-08
| | | | | | Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3001
* Update wlr_box includesLibravatar Simon Ser2021-07-07
| | | | | | Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3011
* input: Move get_current_time_msec in from utilLibravatar Kenny Levinsen2021-06-23
| | | | | | | get_current_time_msec is only used in cursor.c, so we can move it in and make it static. This is primarily intended to avoid a symbol collision with wlroots, which we unfortunately do not have a good solution for yet.
* 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.
* 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/cursor: unhide cursor on synthetic inputLibravatar Tudor Brindus2020-12-06
| | | | Fixes #5847.
* Add missing includes for wlr_input_device.hLibravatar Simon Ser2020-11-11
| | | | References: https://github.com/swaywm/wlroots/pull/2470
* 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.