Rebase against 370254cbe93beae6a9ff693d98c638db5bfb1134.

This commit is contained in:
Sebastian Lackner
2015-11-12 18:17:43 +01:00
parent 3faa0f1212
commit 75dc81b7d3
8 changed files with 94 additions and 166 deletions

View File

@@ -1,70 +0,0 @@
From d4e11dc9293e9faea3edb4c0d7c3defbb621ca97 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 22 Jan 2015 16:34:58 +0100
Subject: server: Only send WM_WINE_CLIPCURSOR for forced clip resets.
---
dlls/user32/message.c | 6 ++++++
server/queue.c | 8 ++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index eac4e4d..67e1cf4 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -1881,6 +1881,12 @@ static LRESULT handle_internal_message( HWND hwnd, UINT msg, WPARAM wparam, LPAR
return call_current_hook( h_extra->handle, HC_ACTION, wparam, h_extra->lparam );
}
case WM_WINE_CLIPCURSOR:
+ if (!lparam)
+ {
+ /* This is just a notification, nothing to do. Clipping will be
+ * done by the process that issues the set_cursor wineserver call. */
+ return 0;
+ }
if (wparam)
{
RECT rect;
diff --git a/server/queue.c b/server/queue.c
index 3a321cd..19acbd3 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -362,7 +362,7 @@ static void set_cursor_pos( struct desktop *desktop, int x, int y )
}
/* set the cursor clip rectangle */
-static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect )
+static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, int do_clip )
{
rectangle_t top_rect;
int x, y;
@@ -381,7 +381,7 @@ static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect
else desktop->cursor.clip = top_rect;
if (desktop->cursor.clip_msg)
- post_desktop_message( desktop, desktop->cursor.clip_msg, rect != NULL, 0 );
+ post_desktop_message( desktop, desktop->cursor.clip_msg, rect != NULL, do_clip );
/* warp the mouse to be inside the clip rect */
x = min( max( desktop->cursor.x, desktop->cursor.clip.left ), desktop->cursor.clip.right-1 );
@@ -393,7 +393,7 @@ static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect
static void set_foreground_input( struct desktop *desktop, struct thread_input *input )
{
if (desktop->foreground_input == input) return;
- set_clip_rectangle( desktop, NULL );
+ set_clip_rectangle( desktop, NULL, 1 );
desktop->foreground_input = input;
}
@@ -3023,7 +3023,7 @@ DECL_HANDLER(set_cursor)
if (req->clip_msg && get_top_window_owner(desktop) == current->process)
desktop->cursor.clip_msg = req->clip_msg;
- set_clip_rectangle( desktop, (req->flags & SET_CURSOR_NOCLIP) ? NULL : &req->clip );
+ set_clip_rectangle( desktop, (req->flags & SET_CURSOR_NOCLIP) ? NULL : &req->clip, 0 );
}
reply->new_x = input->desktop->cursor.x;
--
2.3.1

View File

@@ -1,3 +1,2 @@
Fixes: [33479] Fix cursor clip regression / broken raw input in multiple games
Fixes: [38087] Fix multithreading issues with fullscreen clipping
Category: stable