Skip to content

Commit 83ca0f5

Browse files
committed
HACK: winex11: Don't rely on _NET_ACTIVE_WINDOW for tracking focus under gamescope.
gamescope does not set the NET_ACTIVE_WINDOW property in the root window, meaning we can't rely on it to track focus or some games will keep input focus regardless of what window is on top gamescope pull request: ValveSoftware/gamescope#2063 CW-Bug-Id: #26217
1 parent 6f89fa8 commit 83ca0f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dlls/winex11.drv/event.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ static void set_focus( Display *display, HWND focus, Time time )
700700

701701
TRACE( "setting foreground window to %p\n", focus );
702702

703-
if (!is_net_supported( x11drv_atom(_NET_ACTIVE_WINDOW) ))
703+
if (X11DRV_HasWindowManager( "steamcompmgr" ) || !is_net_supported( x11drv_atom(_NET_ACTIVE_WINDOW) ))
704704
{
705705
NtUserSetForegroundWindow( focus );
706706

@@ -969,7 +969,8 @@ static void focus_out( Display *display , HWND hwnd )
969969
/* don't reset the foreground window, if the window which is
970970
getting the focus is a Wine window */
971971

972-
if (!is_net_supported( x11drv_atom(_NET_ACTIVE_WINDOW) ) && !is_current_process_focused())
972+
if ((X11DRV_HasWindowManager( "steamcompmgr" ) || !is_net_supported( x11drv_atom(_NET_ACTIVE_WINDOW) ))
973+
&& !is_current_process_focused())
973974
{
974975
/* Abey : 6-Oct-99. Check again if the focus out window is the
975976
Foreground window, because in most cases the messages sent

0 commit comments

Comments
 (0)