summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libvo/x11_common.c21
-rw-r--r--libvo/x11_common.h2
2 files changed, 11 insertions, 12 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 925fd9ca57..0ba4693507 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -988,9 +988,6 @@ void vo_x11_uninit(struct vo *vo)
}
}
-static unsigned int mouse_timer;
-static int mouse_waiting_hide;
-
int vo_x11_check_events(struct vo *vo)
{
struct vo_x11_state *x11 = vo->x11;
@@ -1003,10 +1000,10 @@ int vo_x11_check_events(struct vo *vo)
// unsigned long vo_KeyTable[512];
- if ((vo_mouse_autohide) && mouse_waiting_hide &&
- (GetTimerMS() - mouse_timer >= 1000)) {
+ if ((vo_mouse_autohide) && x11->mouse_waiting_hide &&
+ (GetTimerMS() - x11->mouse_timer >= 1000)) {
vo_hidecursor(display, x11->window);
- mouse_waiting_hide = 0;
+ x11->mouse_waiting_hide = 0;
}
while (XPending(display))
@@ -1083,16 +1080,16 @@ int vo_x11_check_events(struct vo *vo)
if (vo_mouse_autohide)
{
vo_showcursor(display, x11->window);
- mouse_waiting_hide = 1;
- mouse_timer = GetTimerMS();
+ x11->mouse_waiting_hide = 1;
+ x11->mouse_timer = GetTimerMS();
}
break;
case ButtonPress:
if (vo_mouse_autohide)
{
vo_showcursor(display, x11->window);
- mouse_waiting_hide = 1;
- mouse_timer = GetTimerMS();
+ x11->mouse_waiting_hide = 1;
+ x11->mouse_timer = GetTimerMS();
}
#ifdef HAVE_NEW_GUI
// Ignore mouse button 1-3 under GUI.
@@ -1107,8 +1104,8 @@ int vo_x11_check_events(struct vo *vo)
if (vo_mouse_autohide)
{
vo_showcursor(display, x11->window);
- mouse_waiting_hide = 1;
- mouse_timer = GetTimerMS();
+ x11->mouse_waiting_hide = 1;
+ x11->mouse_timer = GetTimerMS();
}
#ifdef HAVE_NEW_GUI
// Ignore mouse button 1-3 under GUI.
diff --git a/libvo/x11_common.h b/libvo/x11_common.h
index b40755962a..2d498166f4 100644
--- a/libvo/x11_common.h
+++ b/libvo/x11_common.h
@@ -22,6 +22,8 @@ struct vo_x11_state {
GC f_gc;
XSizeHints vo_hint;
+ unsigned int mouse_timer;
+ int mouse_waiting_hide;
unsigned int olddecor;
unsigned int oldfuncs;