diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-11 11:44:50 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-11 11:44:50 +0000 |
commit | 30c218a61b1770ba7afcf4f738ed71a8312af51a (patch) | |
tree | bed261faaded6d9ef8c1b21adabf61c3f7f480ce /libvo/x11_common.c | |
parent | 1bf9249b8c40d47e0089a1e0a140a4d99404a69e (diff) | |
download | mpv-30c218a61b1770ba7afcf4f738ed71a8312af51a.tar.bz2 mpv-30c218a61b1770ba7afcf4f738ed71a8312af51a.tar.xz |
Added new input mouse support in x11 vo
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4659 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r-- | libvo/x11_common.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 1b77e0c765..e5e5b498d4 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -29,6 +29,11 @@ #include <X11/extensions/xf86vmode.h> #endif +#ifdef HAVE_NEW_INPUT +#include "../input/input.h" +#include "../input/mouse.h" +#endif + /* * If SCAN_VISUALS is defined, vo_init() scans all available TrueColor * visuals for the 'best' visual for MPlayer video display. Note that @@ -425,6 +430,17 @@ int vo_x11_check_events(Display *mydisplay){ vo_x11_putkey( ( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) ) ); ret|=VO_EVENT_KEYPRESS; break; +#ifdef HAVE_NEW_INPUT + case ButtonPress: + // Ignore mouse whell press event + if(Event.xbutton.button == 4 || Event.xbutton.button == 5) + break; + mplayer_put_key((MOUSE_BTN0+Event.xbutton.button-1)|MP_KEY_DOWN); + break; + case ButtonRelease: + mplayer_put_key(MOUSE_BTN0+Event.xbutton.button-1); + break; +#endif } } #ifdef HAVE_NEW_GUI |