mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
opt: hide cursor on touchdown
This commit is contained in:
parent
55a29750e0
commit
ad55132a56
1 changed files with 12 additions and 2 deletions
14
src/mango.c
14
src/mango.c
|
|
@ -1877,7 +1877,11 @@ buttonpress(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_surface *old_pointer_focus_surface =
|
struct wlr_surface *old_pointer_focus_surface =
|
||||||
seat->pointer_state.focused_surface;
|
seat->pointer_state.focused_surface;
|
||||||
|
|
||||||
handlecursoractivity();
|
if (!event->pointer ||
|
||||||
|
event->pointer->base.type != WLR_INPUT_DEVICE_TOUCH) {
|
||||||
|
handlecursoractivity();
|
||||||
|
}
|
||||||
|
|
||||||
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||||
|
|
||||||
if (check_trackpad_disabled(event->pointer)) {
|
if (check_trackpad_disabled(event->pointer)) {
|
||||||
|
|
@ -3968,7 +3972,9 @@ void motionnotify(unsigned int time, struct wlr_input_device *device, double dx,
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_cursor_move(cursor, device, dx, dy);
|
wlr_cursor_move(cursor, device, dx, dy);
|
||||||
handlecursoractivity();
|
if (!device || device->type != WLR_INPUT_DEVICE_TOUCH) {
|
||||||
|
handlecursoractivity();
|
||||||
|
}
|
||||||
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||||
|
|
||||||
/* Update selmon (even while dragging a window) */
|
/* Update selmon (even while dragging a window) */
|
||||||
|
|
@ -5231,6 +5237,10 @@ void touchdown(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||||
|
|
||||||
|
if (!cursor_hidden) {
|
||||||
|
hidecursor(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
// Map the input to the appropriate output, to ensure that rotation is
|
// Map the input to the appropriate output, to ensure that rotation is
|
||||||
// handled.
|
// handled.
|
||||||
wl_list_for_each(m, &mons, link) {
|
wl_list_for_each(m, &mons, link) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue