Skip to content

Commit

Permalink
video_window: use VLC_TICK_MIN to init last_left_press
Browse files Browse the repository at this point in the history
  • Loading branch information
robUx4 authored and fkuehne committed Sep 13, 2024
1 parent 4746ea5 commit 551b1bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/video_output/video_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static void vout_display_window_MouseEvent(vlc_window_t *window,
{
case VLC_WINDOW_MOUSE_MOVED:
vlc_mouse_SetPosition(m, ev->x, ev->y);
state->mouse.last_left_press = INT64_MIN;
state->mouse.last_left_press = VLC_TICK_MIN;
break;

case VLC_WINDOW_MOUSE_PRESSED:
Expand All @@ -156,11 +156,11 @@ static void vout_display_window_MouseEvent(vlc_window_t *window,
{
const vlc_tick_t now = vlc_tick_now();

if (state->mouse.last_left_press != INT64_MIN
if (state->mouse.last_left_press != VLC_TICK_MIN
&& now - state->mouse.last_left_press < DOUBLE_CLICK_TIME)
{
m->b_double_click = true;
state->mouse.last_left_press = INT64_MIN;
state->mouse.last_left_press = VLC_TICK_MIN;
}
else
state->mouse.last_left_press = now;
Expand Down Expand Up @@ -395,7 +395,7 @@ vlc_window_t *vout_display_window_New(vout_thread_t *vout)
vlc_mutex_init(&state->lock);
vlc_mouse_Init(&state->mouse.window);
vlc_mouse_Init(&state->mouse.video);
state->mouse.last_left_press = INT64_MIN;
state->mouse.last_left_press = VLC_TICK_MIN;
state->mouse.event = NULL;
state->vout = vout;

Expand Down

0 comments on commit 551b1bd

Please sign in to comment.