changeset 7539:56ea9db91251

-nograbpointer, based on old patch by Christian Ohm <chr.ohm@gmx.net>
author arpi
date Sat, 28 Sep 2002 20:09:14 +0000
parents c7b61f316edf
children 2a1766fec13e
files Gui/mplayer/gtk/fs.c cfg-mplayer.h libvo/video_out.c libvo/video_out.h libvo/vo_dga.c libvo/vo_x11.c libvo/vo_xv.c
diffstat 7 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/gtk/fs.c	Sat Sep 28 19:42:10 2002 +0000
+++ b/Gui/mplayer/gtk/fs.c	Sat Sep 28 20:09:14 2002 +0000
@@ -33,7 +33,7 @@
 gchar         * fsSelectedFile = NULL;
 gchar         * fsSelectedDirectory = NULL;
 unsigned char * fsThatDir = ".";
-gchar           fsFilter[64] = "*";
+gchar           fsFilter[256] = "*";
 
 int             fsPressed = 0;
 int             fsType    = 0;
--- a/cfg-mplayer.h	Sat Sep 28 19:42:10 2002 +0000
+++ b/cfg-mplayer.h	Sat Sep 28 20:09:14 2002 +0000
@@ -253,6 +253,9 @@
 	{"novsync", &vo_vsync, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 	{"panscan", &vo_panscan, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 1.0, NULL},
 
+	{"grabpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+	{"nograbpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+
 #ifdef HAVE_X11
 	// x11,xv,xmga,xvidix
 	{"wid", &WinID, CONF_TYPE_INT, 0, 0, 0, NULL},
--- a/libvo/video_out.c	Sat Sep 28 19:42:10 2002 +0000
+++ b/libvo/video_out.c	Sat Sep 28 20:09:14 2002 +0000
@@ -30,6 +30,7 @@
 int vo_dheight=0;
 int vo_dbpp=0;
 
+int vo_grabpointer = 1;
 int vo_doublebuffering = 0;
 int vo_vsync = 0;
 int vo_fs = 0;
--- a/libvo/video_out.h	Sat Sep 28 19:42:10 2002 +0000
+++ b/libvo/video_out.h	Sat Sep 28 20:09:14 2002 +0000
@@ -170,6 +170,7 @@
 extern int vo_dheight;
 extern int vo_dbpp;
 
+extern int vo_grabpointer;
 extern int vo_doublebuffering;
 extern int vo_directrendering;
 extern int vo_vsync;
--- a/libvo/vo_dga.c	Sat Sep 28 19:42:10 2002 +0000
+++ b/libvo/vo_dga.c	Sat Sep 28 20:09:14 2002 +0000
@@ -579,6 +579,7 @@
   if(vo_dga_is_running){	
     vo_dga_is_running = 0;
     mp_msg(MSGT_VO,  MSGL_V, "vo_dga: in uninit\n");
+    if(vo_grabpointer)
     XUngrabPointer (vo_dga_dpy, CurrentTime);
     XUngrabKeyboard (vo_dga_dpy, CurrentTime);
 #ifdef HAVE_DGA2
@@ -1037,6 +1038,7 @@
   
   XGrabKeyboard (vo_dga_dpy, DefaultRootWindow(vo_dga_dpy), True, 
                  GrabModeAsync,GrabModeAsync, CurrentTime);
+  if(vo_grabpointer)
   XGrabPointer (vo_dga_dpy, DefaultRootWindow(vo_dga_dpy), True, 
                 ButtonPressMask,GrabModeAsync, GrabModeAsync, 
                 None, None, CurrentTime);
--- a/libvo/vo_x11.c	Sat Sep 28 19:42:10 2002 +0000
+++ b/libvo/vo_x11.c	Sat Sep 28 20:09:14 2002 +0000
@@ -372,6 +372,7 @@
     if ( vm )
      {
       /* Grab the mouse pointer in our window */
+      if(vo_grabpointer)
       XGrabPointer(mDisplay, vo_window, True, 0,
                    GrabModeAsync, GrabModeAsync,
                    vo_window, None, CurrentTime);
--- a/libvo/vo_xv.c	Sat Sep 28 19:42:10 2002 +0000
+++ b/libvo/vo_xv.c	Sat Sep 28 20:09:14 2002 +0000
@@ -404,6 +404,7 @@
     if ( vm )
      {
       /* Grab the mouse pointer in our window */
+      if(vo_grabpointer)
       XGrabPointer(mDisplay, vo_window, True, 0,
                    GrabModeAsync, GrabModeAsync,
                    vo_window, None, CurrentTime);