From 2003857aa2bb32f24f72561374569dd2a2132cc2 Mon Sep 17 00:00:00 2001 From: nicodvb Date: Sat, 16 Sep 2006 15:13:41 +0000 Subject: report to mplayer with a slave command the coordinates of the pointer reported by x11; rescale coordinates to [0,1]x[0,1] range - patch by Jonas Jermann and me git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19856 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/x11_common.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libvo') diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 9149192c40..d2607b7455 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -63,6 +63,7 @@ #define WIN_LAYER_ONTOP 6 #define WIN_LAYER_ABOVE_DOCK 10 +extern int enable_mouse_movements; int fs_layer = WIN_LAYER_ABOVE_DOCK; static int orig_layer = 0; static int old_gravity = NorthWestGravity; @@ -1084,6 +1085,13 @@ int vo_x11_check_events(Display * mydisplay) } break; case MotionNotify: + if(enable_mouse_movements) + { + char cmd_str[40]; + sprintf(cmd_str,"set_mouse_pos %i %i",Event.xmotion.x, Event.xmotion.y); + mp_input_queue_cmd(mp_input_parse_cmd(cmd_str)); + } + if (vo_mouse_autohide) { vo_showcursor(mydisplay, vo_window); -- cgit v1.2.3