You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-12-15 08:03:15 -08:00
Rebase against 5a66eab725423951860676aef49feeb3668eb20c.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
From b41d5d29f777dccdd43f09270858f2ca032db00d Mon Sep 17 00:00:00 2001
|
||||
From 8997ff8b93a64bd2d0db463b6789d05dc5a5fbb5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= <gabrielopcode@gmail.com>
|
||||
Date: Mon, 22 Jul 2019 15:29:25 +0300
|
||||
Subject: [PATCH 1/2] user32/focus: Prevent a recursive loop with the
|
||||
activation messages
|
||||
Subject: [PATCH] user32/focus: Prevent a recursive loop with the activation
|
||||
messages
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@@ -21,10 +21,10 @@ Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
|
||||
3 files changed, 31 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c
|
||||
index f1c883167e..0d32d008a7 100644
|
||||
index a5fc376bdc6..cae559270bf 100644
|
||||
--- a/dlls/user32/focus.c
|
||||
+++ b/dlls/user32/focus.c
|
||||
@@ -78,7 +78,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||
@@ -89,7 +89,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||
{
|
||||
HWND previous = GetActiveWindow();
|
||||
BOOL ret;
|
||||
@@ -33,7 +33,7 @@ index f1c883167e..0d32d008a7 100644
|
||||
CBTACTIVATESTRUCT cbt;
|
||||
|
||||
if (previous == hwnd)
|
||||
@@ -87,16 +87,24 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||
@@ -98,16 +98,24 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ index f1c883167e..0d32d008a7 100644
|
||||
}
|
||||
|
||||
SERVER_START_REQ( set_active_window )
|
||||
@@ -106,9 +114,9 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||
@@ -117,9 +125,9 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||
previous = wine_server_ptr_handle( reply->previous );
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
@@ -79,7 +79,7 @@ index f1c883167e..0d32d008a7 100644
|
||||
|
||||
if (hwnd)
|
||||
{
|
||||
@@ -116,7 +124,11 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||
@@ -127,7 +135,11 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||
if (SendMessageW( hwnd, WM_QUERYNEWPALETTE, 0, 0 ))
|
||||
SendMessageTimeoutW( HWND_BROADCAST, WM_PALETTEISCHANGING, (WPARAM)hwnd, 0,
|
||||
SMTO_ABORTIFHUNG, 2000, NULL );
|
||||
@@ -92,16 +92,16 @@ index f1c883167e..0d32d008a7 100644
|
||||
}
|
||||
|
||||
old_thread = previous ? GetWindowThreadProcessId( previous, NULL ) : 0;
|
||||
@@ -148,7 +160,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||
@@ -159,7 +171,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||
}
|
||||
}
|
||||
|
||||
- if (IsWindow(hwnd))
|
||||
+ if (!(winflags & WIN_IS_IN_ACTIVATION) && IsWindow(hwnd))
|
||||
{
|
||||
SendMessageW( hwnd, WM_NCACTIVATE, (hwnd == GetForegroundWindow()), (LPARAM)previous );
|
||||
SendMessageW( hwnd, WM_NCACTIVATE, hwnd == NtUserGetForegroundWindow(), (LPARAM)previous );
|
||||
SendMessageW( hwnd, WM_ACTIVATE,
|
||||
@@ -173,7 +185,9 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||
@@ -184,7 +196,9 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,10 +113,10 @@ index f1c883167e..0d32d008a7 100644
|
||||
|
||||
|
||||
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
|
||||
index a5bc1c5518..64f7eeecf3 100644
|
||||
index 9164f57fdc2..01cb214acdf 100644
|
||||
--- a/dlls/user32/tests/msg.c
|
||||
+++ b/dlls/user32/tests/msg.c
|
||||
@@ -5142,7 +5142,7 @@ static void test_messages(void)
|
||||
@@ -5571,7 +5571,7 @@ static void test_messages(void)
|
||||
|
||||
ShowWindow(hwnd, SW_MINIMIZE);
|
||||
flush_events();
|
||||
@@ -126,7 +126,7 @@ index a5bc1c5518..64f7eeecf3 100644
|
||||
|
||||
if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MINIMIZE)
|
||||
diff --git a/dlls/user32/win.h b/dlls/user32/win.h
|
||||
index 1f51fd6331..a64cc66be5 100644
|
||||
index 1f51fd63314..a64cc66be5a 100644
|
||||
--- a/dlls/user32/win.h
|
||||
+++ b/dlls/user32/win.h
|
||||
@@ -79,6 +79,7 @@ typedef struct tagWND
|
||||
@@ -138,5 +138,5 @@ index 1f51fd6331..a64cc66be5 100644
|
||||
/* Window functions */
|
||||
extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.17.1
|
||||
2.34.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user