summaryrefslogtreecommitdiffstats
path: root/libvo/x11_common.c
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-11 11:44:50 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-11 11:44:50 +0000
commit30c218a61b1770ba7afcf4f738ed71a8312af51a (patch)
treebed261faaded6d9ef8c1b21adabf61c3f7f480ce /libvo/x11_common.c
parent1bf9249b8c40d47e0089a1e0a140a4d99404a69e (diff)
downloadmpv-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.c16
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