-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update pkgrel and re-add a missing alt-tab refinement patch
- Loading branch information
Showing
3 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...-alt-tab-on-certain-window-managers.patch → ...-alt-tab-on-certain-window-managers.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 5c8c060fc9d1d20eebe12da2e6dacddd88c07d82 Mon Sep 17 00:00:00 2001 | ||
From: Torge Matthies <[email protected]> | ||
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 ++++ | ||
|
45 changes: 45 additions & 0 deletions
45
patches/wine/0005-osu/0017-ps0128-p0002-HACK-Add-WM-specific-flags-for-osu-alt-tab-fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From 719056116394fc694ed307352d0ed877aca6ceae Mon Sep 17 00:00:00 2001 | ||
From: NelloKudo <[email protected]> | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters