#define IGNORE_MOTION_THRESHOLD_MS 1000
#define MOTION_POS_THRESHOLD_PIX 5
+#define DOUBLE_CLICK_TIME_MS 500
+
void WindowHandlePlayerEvent(MainWindow *win, XEvent *event) {
// event handler for intercepted player mouse events
// win->player is not NULL
win->player_event_time = cur_motion_time;
win->motion_playback_time = win->player->playback_time;
} else if(etype == ButtonPress) {
- win->player_event_time = event->xbutton.time;
+ Time t = event->xbutton.time;
+ if(t - win->button_press_time < DOUBLE_CLICK_TIME_MS) {
+ // double click
+ WindowFullscreen(main_window, !win->fullscreen);
+ win->button_press_time = 0;
+ } else {
+ win->button_press_time = t;
+ }
} else if(etype == ButtonRelease) {
win->player_event_time = event->xbutton.time;
}
void WindowShowPlayerCursor(MainWindow *win) {
if(win->cursorhidden && win->player && win->player->window != 0) {
XDefineCursor(XtDisplay(win->player_widget), XtWindow(win->player_widget), None);
- win->cursorhidden = False;
XFlush(XtDisplay(win->player_widget));
}
+ win->cursorhidden = False;
}