[PATCH v4 1/8] Revert "winex11.drv: Retry last ClipCursor when grab is released."
Rémi Bernon
rbernon at codeweavers.com
Mon Oct 21 02:13:39 CDT 2019
This reverts commit 92177b0b161e91f1d609615d89d8e3199feea33f.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
dlls/winex11.drv/event.c | 8 --------
dlls/winex11.drv/mouse.c | 24 ------------------------
dlls/winex11.drv/x11drv.h | 1 -
3 files changed, 33 deletions(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index 25730192d3d..6df5b9bcb2d 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -789,7 +789,6 @@ static BOOL X11DRV_FocusIn( HWND hwnd, XEvent *xev )
break;
case NotifyUngrab:
keyboard_grabbed = FALSE;
- retry_grab_clipping_window();
return TRUE; /* ignore wm specific NotifyUngrab / NotifyGrab events w.r.t focus */
}
@@ -891,13 +890,6 @@ static BOOL X11DRV_FocusOut( HWND hwnd, XEvent *xev )
break;
case NotifyGrab:
keyboard_grabbed = TRUE;
-
- /* This will do nothing due to keyboard_grabbed == TRUE, but it
- * will save the current clipping rect so we can restore it on
- * FocusIn with NotifyUngrab mode.
- */
- retry_grab_clipping_window();
-
return TRUE; /* ignore wm specific NotifyUngrab / NotifyGrab events w.r.t focus */
}
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 15e5c04a41e..4411382d3f1 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -125,9 +125,6 @@ XContext cursor_context = 0;
static HWND cursor_window;
static HCURSOR last_cursor;
static DWORD last_cursor_change;
-static RECT last_clip_rect;
-static HWND last_clip_foreground_window;
-static BOOL last_clip_refused;
static RECT clip_rect;
static Cursor create_cursor( HANDLE handle );
@@ -398,15 +395,8 @@ static BOOL grab_clipping_window( const RECT *clip )
if (keyboard_grabbed)
{
WARN( "refusing to clip to %s\n", wine_dbgstr_rect(clip) );
- last_clip_refused = TRUE;
- last_clip_foreground_window = GetForegroundWindow();
- last_clip_rect = *clip;
return FALSE;
}
- else
- {
- last_clip_refused = FALSE;
- }
/* enable XInput2 unless we are already clipping */
if (!data->clip_hwnd) enable_xinput2();
@@ -481,20 +471,6 @@ void reset_clipping_window(void)
ClipCursor( NULL ); /* make sure the clip rectangle is reset too */
}
-/***********************************************************************
- * retry_grab_clipping_window
- *
- * Restore the current clip rectangle or retry the last one if it has
- * been refused because of an active keyboard grab.
- */
-void retry_grab_clipping_window(void)
-{
- if (clipping_cursor)
- ClipCursor( &clip_rect );
- else if (last_clip_refused && GetForegroundWindow() == last_clip_foreground_window)
- ClipCursor( &last_clip_rect );
-}
-
BOOL CDECL X11DRV_ClipCursor( const RECT *clip );
/***********************************************************************
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 135faa8989b..607ff474e2a 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -625,7 +625,6 @@ extern void sync_window_cursor( Window window ) DECLSPEC_HIDDEN;
extern LRESULT clip_cursor_notify( HWND hwnd, HWND prev_clip_hwnd, HWND new_clip_hwnd ) DECLSPEC_HIDDEN;
extern void ungrab_clipping_window(void) DECLSPEC_HIDDEN;
extern void reset_clipping_window(void) DECLSPEC_HIDDEN;
-extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN;
extern BOOL clip_fullscreen_window( HWND hwnd, BOOL reset ) DECLSPEC_HIDDEN;
extern void move_resize_window( HWND hwnd, int dir ) DECLSPEC_HIDDEN;
extern void X11DRV_InitKeyboard( Display *display ) DECLSPEC_HIDDEN;
--
2.23.0
More information about the wine-devel
mailing list