Rebase against 7feaa6795a26c97b5ce4327a23129eb20a049859.

This commit is contained in:
Zebediah Figura 2022-09-14 17:30:59 -05:00
parent 19c062dbc7
commit ffaf883b19
3 changed files with 12 additions and 26 deletions

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "ef13dcf0b98d3fc489d27a0c0fcbed5ed0e584b4"
echo "7feaa6795a26c97b5ce4327a23129eb20a049859"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 757ca470261e45e8c3133ee0bb64e76198f6c02f Mon Sep 17 00:00:00 2001
From 364612d585a26bb8b4b9f8428103585e05f7ee78 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] user32/focus: Prevent a recursive loop with the activation
@ -15,29 +15,15 @@ actually depend on this behavior, so it is needed.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46274
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
---
dlls/user32/tests/msg.c | 2 +-
dlls/win32u/input.c | 41 ++++++++++++++++++++++++------------
dlls/win32u/ntuser_private.h | 1 +
3 files changed, 30 insertions(+), 14 deletions(-)
2 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 63388e2250e..6ddac9cc7d3 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -5571,7 +5571,7 @@ static void test_messages(void)
ShowWindow(hwnd, SW_MINIMIZE);
flush_events();
- ok_sequence(WmShowMinOverlappedSeq, "ShowWindow(SW_SHOWMINIMIZED):overlapped", TRUE);
+ ok_sequence(WmShowMinOverlappedSeq, "ShowWindow(SW_SHOWMINIMIZED):overlapped", FALSE);
flush_sequence();
if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MINIMIZE)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index a2d1af57f78..8b1cae060e2 100644
index f3b724e7010..9f89f21059f 100644
--- a/dlls/win32u/input.c
+++ b/dlls/win32u/input.c
@@ -1569,7 +1569,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
@@ -1599,7 +1599,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
{
HWND previous = get_active_window();
BOOL ret;
@ -46,7 +32,7 @@ index a2d1af57f78..8b1cae060e2 100644
CBTACTIVATESTRUCT cbt;
if (previous == hwnd)
@@ -1578,16 +1578,24 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
@@ -1608,16 +1608,24 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
return TRUE;
}
@ -80,7 +66,7 @@ index a2d1af57f78..8b1cae060e2 100644
}
SERVER_START_REQ( set_active_window )
@@ -1607,7 +1615,11 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
@@ -1637,7 +1645,11 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
if (send_message( hwnd, WM_QUERYNEWPALETTE, 0, 0 ))
send_message_timeout( HWND_BROADCAST, WM_PALETTEISCHANGING, (WPARAM)hwnd, 0,
SMTO_ABORTIFHUNG, 2000, FALSE );
@ -93,7 +79,7 @@ index a2d1af57f78..8b1cae060e2 100644
}
old_thread = previous ? get_window_thread( previous, NULL ) : 0;
@@ -1639,7 +1651,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
@@ -1669,7 +1681,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
}
}
@ -102,7 +88,7 @@ index a2d1af57f78..8b1cae060e2 100644
{
send_message( hwnd, WM_NCACTIVATE, hwnd == NtUserGetForegroundWindow(), (LPARAM)previous );
send_message( hwnd, WM_ACTIVATE,
@@ -1666,12 +1678,15 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
@@ -1689,12 +1701,15 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
/* Do not change focus if the window is no more active */
if (hwnd == info.hwndActive)
{
@ -120,7 +106,7 @@ index a2d1af57f78..8b1cae060e2 100644
/**********************************************************************
diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h
index 9f93feea407..db5ef584fd8 100644
index 8287126258e..38ac4498a83 100644
--- a/dlls/win32u/ntuser_private.h
+++ b/dlls/win32u/ntuser_private.h
@@ -104,6 +104,7 @@ typedef struct tagWND
@ -132,5 +118,5 @@ index 9f93feea407..db5ef584fd8 100644
#define WND_OTHER_PROCESS ((WND *)1) /* returned by get_win_ptr on unknown window handles */
#define WND_DESKTOP ((WND *)2) /* returned by get_win_ptr on the desktop window */
--
2.35.1
2.37.2

View File

@ -1 +1 @@
ef13dcf0b98d3fc489d27a0c0fcbed5ed0e584b4
7feaa6795a26c97b5ce4327a23129eb20a049859