dotfiles/pkgs/osu-wine/patches/ps0128-HACK-Fix-osu-alt-tab-on-certain-window-managers.patch

29 lines
915 B
Diff
Raw Normal View History

2024-05-08 02:06:54 +07:00
From 5c8c060fc9d1d20eebe12da2e6dacddd88c07d82 Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Sun, 26 Nov 2023 18:29:53 +0100
Subject: [PATCH] HACK: Fix osu! alt-tab.
---
dlls/win32u/window.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c
index 11111111111..11111111111 100644
--- a/dlls/win32u/window.c
+++ b/dlls/win32u/window.c
@@ -3514,6 +3514,11 @@ BOOL set_window_pos( WINDOWPOS *winpos, int parent_x, int parent_y )
orig_flags = winpos->flags;
+ /* HACK: fix osu! taking back focus immediately when it is unfocused. */
+ if (winpos->hwndInsertAfter == HWND_NOTOPMOST &&
+ (get_window_long( winpos->hwnd, GWL_EXSTYLE ) & WS_EX_TOPMOST))
+ winpos->flags |= SWP_NOACTIVATE | SWP_NOZORDER;
+
/* First, check z-order arguments. */
if (!(winpos->flags & SWP_NOZORDER))
{
--
0.0.0