steamcompmgr: Resolve transient links before determining input focus
Helps with launchers like FO:NV and other games where we end up having the visuals disjoint from what we actually want to input to. Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
e8dab4efe0
commit
10dd0322d4
1 changed files with 25 additions and 25 deletions
|
@ -1729,31 +1729,6 @@ found:
|
|||
gameFocused = focus->appID != 0;
|
||||
}
|
||||
|
||||
unsigned long focusedWindow = 0;
|
||||
unsigned long focusedAppId = 0;
|
||||
|
||||
if ( inputFocus == NULL )
|
||||
{
|
||||
inputFocus = focus;
|
||||
}
|
||||
|
||||
if ( focus )
|
||||
{
|
||||
focusedWindow = focus->id;
|
||||
focusedAppId = inputFocus->appID;
|
||||
}
|
||||
|
||||
XChangeProperty( dpy, root, gamescopeFocusedAppAtom, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)&focusedAppId, focusedAppId != 0 ? 1 : 0 );
|
||||
|
||||
XChangeProperty( dpy, root, gamescopeFocusedWindowAtom, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)&focusedWindow, focusedWindow != 0 ? 1 : 0 );
|
||||
|
||||
if (!focus)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gameFocused )
|
||||
{
|
||||
// Do some searches through game windows to follow transient links if needed
|
||||
|
@ -1779,6 +1754,31 @@ found:
|
|||
}
|
||||
}
|
||||
|
||||
unsigned long focusedWindow = 0;
|
||||
unsigned long focusedAppId = 0;
|
||||
|
||||
if ( inputFocus == NULL )
|
||||
{
|
||||
inputFocus = focus;
|
||||
}
|
||||
|
||||
if ( focus )
|
||||
{
|
||||
focusedWindow = focus->id;
|
||||
focusedAppId = inputFocus->appID;
|
||||
}
|
||||
|
||||
XChangeProperty( dpy, root, gamescopeFocusedAppAtom, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)&focusedAppId, focusedAppId != 0 ? 1 : 0 );
|
||||
|
||||
XChangeProperty( dpy, root, gamescopeFocusedWindowAtom, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)&focusedWindow, focusedWindow != 0 ? 1 : 0 );
|
||||
|
||||
if (!focus)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// if (fadeOutWindow.id == None && currentFocusWindow != focus->id)
|
||||
// {
|
||||
// // Initiate fade out if switching focus
|
||||
|
|
Loading…
Reference in a new issue