diff options
author | wm4 <wm4@mplayer2.org> | 2012-04-01 22:52:33 +0200 |
---|---|---|
committer | wm4 <wm4@mplayer2.org> | 2012-04-01 22:52:33 +0200 |
commit | 1aa2e36122e6e664e42170f47d6db82873bef5aa (patch) | |
tree | 39e13f93bcb606da9e365c7cd379132bdf53c20b /libvo/x11_common.c | |
parent | fea8c85c8595b797fc839b113c1db252fc55c798 (diff) | |
parent | 8cd71527ade21ea27ea24cdcc66dc71dca460f85 (diff) | |
download | mpv-1aa2e36122e6e664e42170f47d6db82873bef5aa.tar.bz2 mpv-1aa2e36122e6e664e42170f47d6db82873bef5aa.tar.xz |
Merge remote-tracking branch 'origin/master'
Conflicts:
bstr.c
bstr.h
etc/input.conf
input/input.c
input/input.h
libao2/ao_pulse.c
libmpcodecs/vf_ass.c
libmpcodecs/vf_vo.c
libvo/gl_common.c
libvo/x11_common.c
mixer.c
mixer.h
mplayer.c
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r-- | libvo/x11_common.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 7796d626db..2fae9f480a 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -46,7 +46,7 @@ #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/Xatom.h> -#include <X11/keysymdef.h> +#include <X11/keysym.h> #ifdef CONFIG_XSS #include <X11/extensions/scrnsaver.h> @@ -780,12 +780,13 @@ static int check_resize(struct vo *vo) int vo_x11_check_events(struct vo *vo) { struct vo_x11_state *x11 = vo->x11; + struct MPOpts *opts = vo->opts; Display *display = vo->x11->display; int ret = 0; XEvent Event; - if (x11->vo_mouse_autohide && x11->mouse_waiting_hide && - (GetTimerMS() - x11->mouse_timer >= 1000)) { + if (x11->mouse_waiting_hide && opts->cursor_autohide_delay != -1 && + (GetTimerMS() - x11->mouse_timer >= opts->cursor_autohide_delay)) { vo_hidecursor(display, x11->window); x11->mouse_waiting_hide = 0; } @@ -846,16 +847,14 @@ int vo_x11_check_events(struct vo *vo) case MotionNotify: vo_mouse_movement(vo, Event.xmotion.x, Event.xmotion.y); - if (x11->vo_mouse_autohide) - { + if (opts->cursor_autohide_delay > -2) { vo_showcursor(display, x11->window); x11->mouse_waiting_hide = 1; x11->mouse_timer = GetTimerMS(); } break; case ButtonPress: - if (x11->vo_mouse_autohide) - { + if (opts->cursor_autohide_delay > -2) { vo_showcursor(display, x11->window); x11->mouse_waiting_hide = 1; x11->mouse_timer = GetTimerMS(); @@ -865,8 +864,7 @@ int vo_x11_check_events(struct vo *vo) | MP_KEY_DOWN); break; case ButtonRelease: - if (x11->vo_mouse_autohide) - { + if (opts->cursor_autohide_delay > -2) { vo_showcursor(display, x11->window); x11->mouse_waiting_hide = 1; x11->mouse_timer = GetTimerMS(); @@ -1177,7 +1175,6 @@ final: x11->vo_gc = XCreateGC(mDisplay, x11->window, 0, NULL); XSync(mDisplay, False); - x11->vo_mouse_autohide = 1; vo->event_fd = ConnectionNumber(x11->display); } |