Skip to content

Commit

Permalink
exit on long tap
Browse files Browse the repository at this point in the history
  • Loading branch information
chayleaf committed Aug 24, 2024
1 parent 3d02857 commit 8b417bc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions source/wayland/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,21 +551,21 @@ static void wayland_touch_up(void *data, struct wl_touch *wl_touch,
if (id >= MAX_TOUCHPOINTS) {
return;
}
gboolean is_move =
time - self->touches[id].start_time > 500
|| self->touches[id].start_time != self->touches[id].move_time;
if (is_move) {
gboolean has_moved = self->touches[id].start_time != self->touches[id].move_time;
if (has_moved) {
return;
}
RofiViewState *state = rofi_view_get_active();

if (state == NULL) {
return;
}
//rofi_view_handle_mouse_motion(state, self->touches[id].x, self->touches[id].start_y,
// FALSE);
int key = KEY_ENTER;
if (time - self->touches[id].start_time > 200) {
key = KEY_ESC;
}
nk_bindings_seat_handle_key(wayland->bindings_seat, NULL,
KEY_ENTER + 8,
key + 8,
NK_BINDINGS_KEY_STATE_PRESS);
rofi_view_maybe_update(state);
}
Expand Down

0 comments on commit 8b417bc

Please sign in to comment.