changeset 10754:2ca1fc045731

Recieving of mouse events can be switched off. Patch by Markus Rechberger <mrechberger@web.de>
author alex
date Sun, 31 Aug 2003 22:02:25 +0000
parents 524b34c82c90
children 8ec62402a8a3
files DOCS/de/mplayer.1 DOCS/en/mplayer.1 cfg-mplayer.h libvo/x11_common.c
diffstat 4 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/de/mplayer.1	Sun Aug 31 21:55:11 2003 +0000
+++ b/DOCS/de/mplayer.1	Sun Aug 31 22:02:25 2003 +0000
@@ -193,6 +193,9 @@
 .B \-, \-use-stdin
 Liest Daten von stdin. \-idx funktioniert hiermit nicht.
 .TP
+.B \-nomouseinput
+Sperrt die Eingabe mittels Mausbuttons (Buttonpress/release), diese Option wird unter anderem von mozplayerxp verwendet um ein eigenes Kontextmenü anzuzeigen.
+.TP
 .B \-autoq <Qualität> (zusammen mit \-vf pp)
 Ändert dynamisch das Qualitätslevel der Nachbearbeitung, je nachdem, wieviel
 CPU-Zeit gerade frei ist.
--- a/DOCS/en/mplayer.1	Sun Aug 31 21:55:11 2003 +0000
+++ b/DOCS/en/mplayer.1	Sun Aug 31 22:02:25 2003 +0000
@@ -542,7 +542,9 @@
 openlist commands you
 .B need
 this option.
-
+.TP
+.B \-nomouseinput
+Disable any mousebutton press/release input (mozplayerxp's context menu relies on this option) 
 
 .SH "DEMUXER/STREAM OPTIONS"
 .TP
--- a/cfg-mplayer.h	Sun Aug 31 21:55:11 2003 +0000
+++ b/cfg-mplayer.h	Sun Aug 31 22:02:25 2003 +0000
@@ -83,6 +83,7 @@
 extern int stop_xscreensaver;
 extern int vo_x11_keepaspect;
 extern char **vo_fstype_list;
+extern int vo_nomouse_input;
 #endif
 
 #ifdef HAVE_AA
@@ -291,6 +292,7 @@
 	{"keepaspect", &vo_x11_keepaspect, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{"nokeepaspect", &vo_x11_keepaspect, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 	{"fstype", &vo_fstype_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+	{"nomouseinput", &vo_nomouse_input, CONF_TYPE_FLAG,0,0,-1,NULL},
 #endif
 
 #ifdef HAVE_XINERAMA
--- a/libvo/x11_common.c	Sun Aug 31 21:55:11 2003 +0000
+++ b/libvo/x11_common.c	Sun Aug 31 22:02:25 2003 +0000
@@ -71,6 +71,7 @@
 
 /* output window id */
 int WinID=-1;
+int vo_nomouse_input = 0;
 int vo_mouse_autohide = 0;
 int vo_wm_type = 0;
 static int vo_fs_type = 0;
@@ -1184,7 +1185,11 @@
 	XSync(display, False);
 	old_handler = XSetErrorHandler(x11_selectinput_errorhandler);
 	selectinput_err = 0;
-	XSelectInput(display, w, event_mask);
+	if(vo_nomouse_input){
+		XSelectInput(display,w,event_mask & (~(ButtonPressMask | ButtonReleaseMask)));
+	} else {
+		XSelectInput(display, w, event_mask);
+	}
 	XSync(display, False);
 	XSetErrorHandler(old_handler);
 	if (selectinput_err) {