develop.uap-core.de/git
/
uwplayer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
74657df
)
don't activate window drag in osd area
author
Olaf Wintermann
<olaf.wintermann@gmail.com>
Fri, 15 Apr 2022 08:03:18 +0000
(10:03 +0200)
committer
Olaf Wintermann
<olaf.wintermann@gmail.com>
Fri, 15 Apr 2022 08:03:18 +0000
(10:03 +0200)
application/window.c
patch
|
blob
|
history
diff --git
a/application/window.c
b/application/window.c
index
b3f24d7
..
f2c8091
100644
(file)
--- a/
application/window.c
+++ b/
application/window.c
@@
-172,6
+172,7
@@
static void playerEH(Widget widget, XtPointer data, XEvent *event, Boolean *disp
#define IGNORE_MOTION_THRESHOLD_MS 1000
#define MOTION_POS_THRESHOLD_PIX 5
#define IGNORE_MOTION_THRESHOLD_MS 1000
#define MOTION_POS_THRESHOLD_PIX 5
+#define OSD_BOTTOM_THRESHOLD 0.09
#define DOUBLE_CLICK_TIME_MS 500
#define DOUBLE_CLICK_TIME_MS 500
@@
-227,14
+228,20
@@
void WindowHandlePlayerEvent(MainWindow *win, XEvent *event) {
}
} else if(etype == ButtonPress) {
Time t = event->xbutton.time;
}
} 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 = 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;
} else if(etype == ButtonRelease) {
win->player_event_time = event->xbutton.time;
win->pwbuttonpressed = FALSE;