Skip to content

Commit b633694

Browse files
oSoMoNmisyltoad
authored andcommitted
steamcompmgr: Add a workaround for Forza Horizon 4 & 5
This prevents a fully black background window from being considered a dropdown, thus stealing focus.
1 parent e6dcd6c commit b633694

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/steamcompmgr.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3310,6 +3310,12 @@ win_maybe_a_dropdown( steamcompmgr_win_t *w )
33103310
( ( w->hwndStyleEx & invalidLayered ) == 0 ) )
33113311
return true;
33123312

3313+
// Forza Horizon 4 & 5 create a black background window that might incorrectly
3314+
// be considered a valid dropdown and steal focus.
3315+
if ( ( w->appID == 1293830 || w->appID == 1551360 ) &&
3316+
w->maybe_a_dropdown && w->requestedWidth == 0 && w->requestedHeight == 0 )
3317+
return false;
3318+
33133319
// Josh:
33143320
// The logic here is as follows. The window will be treated as a dropdown if:
33153321
//

0 commit comments

Comments
 (0)