Added -dxgrab command line option, which confines cursor motion to the
DirectX primary surface.
This commit is contained in:
parent
9837b598bc
commit
2527a33351
|
@ -4094,6 +4094,11 @@ static HRESULT WINAPI Xlib_IDirectDrawImpl_SetDisplayMode(
|
|||
}
|
||||
TRACE("Setting drawable to %ld\n", This->d.drawable);
|
||||
|
||||
if (Options.DXGrab) {
|
||||
/* Confine cursor movement (risky, but the user asked for it) */
|
||||
TSXGrabPointer(display, This->d.drawable, True, 0, GrabModeAsync, GrabModeAsync, This->d.drawable, None, CurrentTime);
|
||||
}
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ struct options
|
|||
int perfectGraphics; /* Favor correctness over speed for graphics */
|
||||
int noDGA; /* Disable XFree86 DGA extensions */
|
||||
int noXSHM; /* Disable use of XSHM extension */
|
||||
int DXGrab; /* Enable DirectX mouse grab */
|
||||
char * configFileName; /* Command line config file */
|
||||
int screenDepth;
|
||||
};
|
||||
|
|
|
@ -132,6 +132,7 @@ static char szUsage[] =
|
|||
" -name name Set the application name\n"
|
||||
" -nodga Disable XFree86 DGA extensions\n"
|
||||
" -noxshm Disable XSHM extension\n"
|
||||
" -dxgrab Enable DirectX mouse grab\n"
|
||||
" -perfect Favor correctness over speed for graphical operations\n"
|
||||
" -privatemap Use a private color map\n"
|
||||
" -synchronous Turn on synchronous display mode\n"
|
||||
|
|
|
@ -2120,7 +2120,7 @@ static void X11DRV_EVENT_WaitReplaceShmCompletionInternal( int *compl, Drawable
|
|||
TRACE("Wait complete (thread %lx) (time %ld)\n", GetCurrentThreadId(), GetTickCount() );
|
||||
|
||||
/* clear wait */
|
||||
st = InterlockedExchange(&shm_q[n-1].state, 2);
|
||||
st = InterlockedExchange((LPLONG)&shm_q[n-1].state, 2);
|
||||
if (st != 2) {
|
||||
/* first waiter to return, release all other waiters */
|
||||
nn = shm_q[n-1].waiter;
|
||||
|
|
|
@ -70,6 +70,7 @@ static XrmOptionDescRec optionsTable[] =
|
|||
{ "-config", ".config", XrmoptionSepArg, (caddr_t)NULL },
|
||||
{ "-nodga", ".nodga", XrmoptionNoArg, (caddr_t)"off"},
|
||||
{ "-noxshm", ".noxshm", XrmoptionNoArg, (caddr_t)"off"},
|
||||
{ "-dxgrab", ".dxgrab", XrmoptionNoArg, (caddr_t)"on" },
|
||||
{ "-console", ".console", XrmoptionSepArg, (caddr_t)NULL },
|
||||
{ "-dosver", ".dosver", XrmoptionSepArg, (caddr_t)NULL }
|
||||
};
|
||||
|
@ -290,6 +291,8 @@ void X11DRV_USER_ParseOptions(int *argc, char *argv[])
|
|||
Options.noDGA = TRUE;
|
||||
if (X11DRV_USER_GetResource( db, ".noxshm", &value))
|
||||
Options.noXSHM = TRUE;
|
||||
if (X11DRV_USER_GetResource( db, ".dxgrab", &value))
|
||||
Options.DXGrab = TRUE;
|
||||
if (X11DRV_USER_GetResource( db, ".console", &value))
|
||||
driver.driver_list = xstrdup((char *)value.addr);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue