#define IGNORE_MOTION_THRESHOLD_MS 1000
#define MOTION_POS_THRESHOLD_PIX 5
+#define OSD_BOTTOM_THRESHOLD 0.09
#define DOUBLE_CLICK_TIME_MS 500
}
} else if(etype == ButtonPress) {
Time t = event->xbutton.time;
- if(t - win->button_press_time < DOUBLE_CLICK_TIME_MS) {
- // double click
- WindowFullscreen(main_window, !win->fullscreen);
+
+ int yi = win->player_widget->core.height - event->xbutton.y;
+ if((float)yi/(float)win->player_widget->core.height < OSD_BOTTOM_THRESHOLD) {
win->button_press_time = 0;
} else {
- win->button_press_time = t;
+ 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;
+ }
+ win->pwbuttonpressed = 1;
}
- win->pwbuttonpressed = 1;
} else if(etype == ButtonRelease) {
win->player_event_time = event->xbutton.time;
win->pwbuttonpressed = FALSE;