Commit graph

16 commits

Author SHA1 Message Date
Jens Peters
e0d3bebbb7 input: clear SSD hover effects after touch-up
Having a hover effect visible without interaction looks out of
place when there is no cursor (the cursor becomes hidden for/after
touch interaction until next mouse or tablet interaction). Just
clear the hover effect after touch-up to prevent this.
Note that SSD hover effects are still shown during touch-move and
touch-down.
2025-06-16 22:56:46 +02:00
Jens Peters
31dd21de5b input: use mouse emulation for touch when labwc menu is open
Only use the touch protocol when no labwc menu is open.
This ensure that labwc menus will be closed on first touch
down/up since cursor emulation takes care of closing a
menu.
This prevents that a labwc menu stay open during touch
interactions in native touch mode.
2025-06-14 14:07:35 +01:00
Consolatis
a5db63c472 chase wlroots: wlr_surface_accepts args MR 2434
Ref: 5ecbd23c1d44119cb32b345782d50c9664853109
("wlr_surface: fix argument order consistency")
2025-05-21 06:36:08 +01:00
Jens Peters
fc774d0071 input: hide cursor when using touch input
Hide the cursor on touch input and keep the cursur invisible
until pointer or tablet input.
2024-11-10 17:08:38 +09:00
Jens Peters
d1cde3c435 input: close xdg-popups on touch down
Taken over and now shared from the tablet implementation.
2024-11-10 17:08:38 +09:00
Jens Peters
7e0cd8ee5a input: move notify-idle-manager to tablet/touch handlers
Move them away from the cursor emulate functions. This
avoid calling them twice for touch motion.

Also notify idle manager on touch down/up.
2024-11-10 17:08:38 +09:00
Jens Peters
eed972cef1 input: clear pointer focus on touch input
Otherwise the pointer focus could interfere with touch input, like
showing hover effect on unexpected locations.
2024-11-10 17:08:38 +09:00
Jens Peters
3dbd5f30fc input: move touch only with one touch point
In other words, do not move the cursor when more than
one finger is down.
2024-11-10 17:08:38 +09:00
Jens Peters
a3d8688c17 input: warp cursor to touch coordinates
This makes the behavior consistent with non-touch
capable surfaces and the desktop.
2024-11-10 17:08:38 +09:00
Simon Long
45a9bd95e7
Add mouse emulation for touch devices (#2277) 2024-10-29 19:22:01 +00:00
tokyo4j
25f5cdd3a6 Refactor the logic of placing client-menu with ShowMenu action
Before this commit, we assumed `ShowMenu` action is not bound to any
buttons other than window menu button and always place the client-menu
under the window-menu button when atCursor="no". Also, it was going to be
difficult to distinguish whether the action is executed from the window
menu button or the window icon, which will be added soon.

This commit fixes it to open the menu under the actually-clicked button by
passing `cursor_context` to `actions_run()`, with some refactoring:
- `seat->pressed.resize_edges` is removed and it's calculated from the
  cursor position and `seat->pressed.type` just before running Resize
  action. This slightly changes the existing logic to determine the
  resizing edges with Alt-Right + Drag mousebinding, but
  `seat->pressed.type` is still stored on button press so it doesn't bring
  back the issue #543.
- `seat->pressed.toplevel` is removed and `get_toplevel()` in
  `update_pressed_surface()` may be called more often, but its overhead
  will be negligible.
2024-09-21 18:07:34 +01:00
Jens Peters
538eb3ee83 input: use CONNECT_SIGNAL macro 2024-08-13 18:40:34 +02:00
Consolatis
5c6e1ed878 chase: use wayland pointer enums rather than wlr ones
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4575
2024-07-17 21:28:59 +01:00
Simon Long
3ebc07f7aa
Handle touch on headerbar (#1550)
...using cursor emulate events.
2024-03-05 20:41:17 +00:00
Consolatis
5e1562fae6 Make touch depend on cursor to prevent racing 2023-10-30 21:14:04 +00:00
Consolatis
67a8ae8561 Move input related source files into src/input/ 2023-10-30 21:14:04 +00:00
Renamed from src/touch.c (Browse further)