diff options
author | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-09-16 15:13:41 +0000 |
---|---|---|
committer | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-09-16 15:13:41 +0000 |
commit | 2003857aa2bb32f24f72561374569dd2a2132cc2 (patch) | |
tree | 6f1d8d1bc45e988f9a904f871a6e7ca5fa597541 /libvo | |
parent | 8bab2f0d70e1e1d3c368618c5b5a9c98925217b4 (diff) | |
download | mpv-2003857aa2bb32f24f72561374569dd2a2132cc2.tar.bz2 mpv-2003857aa2bb32f24f72561374569dd2a2132cc2.tar.xz |
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
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/x11_common.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); |