[MPlayer-dev-eng] Re: [patch] -nomouseinput

Markus Rechberger mrechberger at web.de
Wed Aug 27 15:56:13 CEST 2003


without fprintf...

Markus Rechberger wrote:

> hey,
>
> since I can't use mplayer's fullscreen option I implemented 
> XReparentWindow in my project, however to use my custom menu for 
> fullscreenswitching mplayer mustn't grab the MouseButton messages, I 
> don't really care about other bindings.  That's why I wrote this patch 
> it adds another global variable hope you won't deny it because of that 
> it's really needed by my plugin (http://mozplayerxp.mozdev.org)
>
> Markus
>
>------------------------------------------------------------------------
>
>Index: cfg-mplayer.h
>===================================================================
>RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
>retrieving revision 1.202
>diff -u -r1.202 cfg-mplayer.h
>--- cfg-mplayer.h	13 Aug 2003 16:29:00 -0000	1.202
>+++ cfg-mplayer.h	27 Aug 2003 13:54:00 -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
>Index: libvo/x11_common.c
>===================================================================
>RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
>retrieving revision 1.150
>diff -u -r1.150 x11_common.c
>--- libvo/x11_common.c	25 Aug 2003 18:13:51 -0000	1.150
>+++ libvo/x11_common.c	27 Aug 2003 13:54:06 -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,12 @@
> 	XSync(display, False);
> 	old_handler = XSetErrorHandler(x11_selectinput_errorhandler);
> 	selectinput_err = 0;
>-	XSelectInput(display, w, event_mask);
>+	fprintf(stderr,"nomouseinput::: %d\n",vo_nomouse_input);
>+	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) {
>  
>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: inputpatch.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030827/6d1026a1/attachment.asc>


More information about the MPlayer-dev-eng mailing list