[PATCH 3/6] user32/focus: Don't activate if the previous window doesn't want to be deactivated
Gabriel Ivăncescu
gabrielopcode at gmail.com
Mon Jan 28 06:34:16 CST 2019
On Windows, if WM_NCACTIVATE returns FALSE, the window should not be able
to be deactivated.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
dlls/user32/focus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c
index 0d32d00..834ceb1 100644
--- a/dlls/user32/focus.c
+++ b/dlls/user32/focus.c
@@ -101,7 +101,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
if (IsWindow(previous))
{
- SendMessageW( previous, WM_NCACTIVATE, FALSE, (LPARAM)hwnd );
+ if (!SendMessageW( previous, WM_NCACTIVATE, FALSE, (LPARAM)hwnd )) goto clear_flags;
SendMessageW( previous, WM_ACTIVATE,
MAKEWPARAM( WA_INACTIVE, IsIconic(previous) ), (LPARAM)hwnd );
}
--
2.19.1
More information about the wine-devel
mailing list