From 3f3e8d295714e6a512e0299a7a85d9d936f8de93 Mon Sep 17 00:00:00 2001 From: Gavriel State Date: Wed, 10 Jan 2001 23:55:56 +0000 Subject: [PATCH] Reenabled DXGrab option. --- dlls/ddraw/ddraw/xvidmode.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/ddraw/ddraw/xvidmode.c b/dlls/ddraw/ddraw/xvidmode.c index 502df506e38..b16d4525b36 100644 --- a/dlls/ddraw/ddraw/xvidmode.c +++ b/dlls/ddraw/ddraw/xvidmode.c @@ -27,6 +27,8 @@ #include "dsurface/dib.h" #include "dsurface/user.h" +#include "win.h" + DEFAULT_DEBUG_CHANNEL(ddraw); static ICOM_VTABLE(IDirectDraw7) XVidMode_DirectDraw_VTable; @@ -337,6 +339,8 @@ XVidMode_DirectDraw_SetDisplayMode(LPDIRECTDRAW7 iface, DWORD dwWidth, { XVIDMODE_DDRAW_PRIV_VAR(priv, This); XF86VidModeModeInfo* new_mode; + WND *tmpWnd = WIN_FindWndPtr(This->window); + Window x11Wnd = X11DRV_WND_GetXWindow(tmpWnd); new_mode = choose_mode(dwWidth, dwHeight, dwRefreshRate, dwFlags); @@ -345,6 +349,10 @@ XVidMode_DirectDraw_SetDisplayMode(LPDIRECTDRAW7 iface, DWORD dwWidth, priv->xvidmode.current_mode = new_mode; set_display_mode(priv->xvidmode.current_mode); } + if (PROFILE_GetWineIniBool( "x11drv", "DXGrab", 0)) { + /* Confine cursor movement (risky, but the user asked for it) */ + TSXGrabPointer(display, x11Wnd, True, 0, GrabModeAsync, GrabModeAsync, x11Wnd, None, CurrentTime); + } } return hr;