-nograbpointer, based on old patch by Christian Ohm <chr.ohm@gmx.net>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7540 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-09-28 20:09:14 +00:00
parent f1ba99cdbe
commit dbb902acc6
7 changed files with 10 additions and 1 deletions

View File

@ -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;

View File

@ -253,6 +253,9 @@ static config_t mplayer_opts[]={
{"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},

View File

@ -30,6 +30,7 @@ int vo_dwidth=0;
int vo_dheight=0;
int vo_dbpp=0;
int vo_grabpointer = 1;
int vo_doublebuffering = 0;
int vo_vsync = 0;
int vo_fs = 0;

View File

@ -170,6 +170,7 @@ extern int vo_dwidth;
extern int vo_dheight;
extern int vo_dbpp;
extern int vo_grabpointer;
extern int vo_doublebuffering;
extern int vo_directrendering;
extern int vo_vsync;

View File

@ -579,6 +579,7 @@ uninit(void)
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 @@ static uint32_t config( uint32_t width, uint32_t height,
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);

View File

@ -372,6 +372,7 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
if ( vm )
{
/* Grab the mouse pointer in our window */
if(vo_grabpointer)
XGrabPointer(mDisplay, vo_window, True, 0,
GrabModeAsync, GrabModeAsync,
vo_window, None, CurrentTime);

View File

@ -404,6 +404,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
if ( vm )
{
/* Grab the mouse pointer in our window */
if(vo_grabpointer)
XGrabPointer(mDisplay, vo_window, True, 0,
GrabModeAsync, GrabModeAsync,
vo_window, None, CurrentTime);