From a0e8cb967ed574d3a6d70854e5f88a2652bb3c19 Mon Sep 17 00:00:00 2001 From: William Horvath Date: Sat, 14 Sep 2024 23:40:12 -0700 Subject: [PATCH] update pkgrel and re-add a missing alt-tab refinement patch --- ...-alt-tab-on-certain-window-managers.patch} | 2 +- ...M-specific-flags-for-osu-alt-tab-fix.patch | 45 +++++++++++++++++++ setup.sh | 2 +- 3 files changed, 47 insertions(+), 2 deletions(-) rename patches/wine/0005-osu/{0018-ps0128-HACK-Fix-osu-alt-tab-on-certain-window-managers.patch => 0017-ps0128-p0001-HACK-Fix-osu-alt-tab-on-certain-window-managers.patch} (95%) create mode 100644 patches/wine/0005-osu/0017-ps0128-p0002-HACK-Add-WM-specific-flags-for-osu-alt-tab-fix.patch diff --git a/patches/wine/0005-osu/0018-ps0128-HACK-Fix-osu-alt-tab-on-certain-window-managers.patch b/patches/wine/0005-osu/0017-ps0128-p0001-HACK-Fix-osu-alt-tab-on-certain-window-managers.patch similarity index 95% rename from patches/wine/0005-osu/0018-ps0128-HACK-Fix-osu-alt-tab-on-certain-window-managers.patch rename to patches/wine/0005-osu/0017-ps0128-p0001-HACK-Fix-osu-alt-tab-on-certain-window-managers.patch index 8f36250..c4a3332 100644 --- a/patches/wine/0005-osu/0018-ps0128-HACK-Fix-osu-alt-tab-on-certain-window-managers.patch +++ b/patches/wine/0005-osu/0017-ps0128-p0001-HACK-Fix-osu-alt-tab-on-certain-window-managers.patch @@ -1,7 +1,7 @@ From 5c8c060fc9d1d20eebe12da2e6dacddd88c07d82 Mon Sep 17 00:00:00 2001 From: Torge Matthies Date: Sun, 26 Nov 2023 18:29:53 +0100 -Subject: [PATCH] HACK: Fix osu! alt-tab. +Subject: [PATCH 1/2] HACK: Fix osu! alt-tab. --- dlls/win32u/window.c | 4 ++++ diff --git a/patches/wine/0005-osu/0017-ps0128-p0002-HACK-Add-WM-specific-flags-for-osu-alt-tab-fix.patch b/patches/wine/0005-osu/0017-ps0128-p0002-HACK-Add-WM-specific-flags-for-osu-alt-tab-fix.patch new file mode 100644 index 0000000..327385d --- /dev/null +++ b/patches/wine/0005-osu/0017-ps0128-p0002-HACK-Add-WM-specific-flags-for-osu-alt-tab-fix.patch @@ -0,0 +1,45 @@ +From 719056116394fc694ed307352d0ed877aca6ceae Mon Sep 17 00:00:00 2001 +From: NelloKudo +Date: Tue, 11 Jun 2024 17:33:35 +0200 +Subject: [PATCH 2/2] HACK: Add WM specific flags for osu alt tab fix. + +Edit of the original patch from openglfreak that fixed focus-in when running osu! as fullscreen: +adding such flags breaks alt-tabbing in Windowed mode on GNOME and KDE, forcing osu! to stay on top of other apps. +This depends on Proton's WM detection function. +--- + dlls/win32u/window.c | 19 ++++++++++++++++--- + 1 file changed, 16 insertions(+), 3 deletions(-) + +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 +@@ -3447,10 +3447,23 @@ 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. */ ++ LONG_PTR wm = __wine_get_window_manager(); ++ ++ /* HACK: fix osu! taking back focus immediately when it is unfocused depending on WM */ + if (winpos->hwndInsertAfter == HWND_NOTOPMOST && +- (get_window_long( winpos->hwnd, GWL_EXSTYLE ) & WS_EX_TOPMOST)) +- winpos->flags |= SWP_NOACTIVATE | SWP_NOZORDER; ++ (get_window_long(winpos->hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST)) ++ { ++ /* If on KDE or GNOME, alt-tab on Fullscreen AND Windowed only works without the SWP_NOZORDER flag. */ ++ if (wm == WINE_WM_X11_KDE || wm == WINE_WM_X11_MUTTER) ++ { ++ winpos->flags |= SWP_NOACTIVATE | SWP_NOOWNERZORDER; ++ } ++ /* In any other case, SWP_NOZORDER is enough to get the game working fine and not take focus on other apps when windowed. */ ++ else ++ { ++ winpos->flags |= SWP_NOACTIVATE | SWP_NOZORDER; ++ } ++ } + + /* First, check z-order arguments. */ + if (!(winpos->flags & SWP_NOZORDER)) +-- +0.0.0 \ No newline at end of file diff --git a/setup.sh b/setup.sh index 5d8e9bb..d490f79 100755 --- a/setup.sh +++ b/setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -pkgrel=9-1 +pkgrel=9-3 pkgname="proton-osu-${pkgrel}" buildname="proton-osu" protonurl=https://github.com/CachyOS/proton-cachyos.git