Skip to content

Commit

Permalink
steamcompmgr: When windows get remapped and were our focus, make sure…
Browse files Browse the repository at this point in the history
… to re-set them as input focus

Fixes keyboard input in an unreleased game.
  • Loading branch information
Joshua-Ashton committed Jul 25, 2023
1 parent 587c6a6 commit 318fd75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/steamcompmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4102,6 +4102,11 @@ map_win(xwayland_ctx_t* ctx, Window id, unsigned long sequence)
w->xwayland().damage_sequence = 0;
w->xwayland().map_sequence = sequence;

if ( w == ctx->focus.inputFocusWindow || w->xwayland().id == ctx->currentKeyboardFocusWindow )
{
XSetInputFocus(ctx->dpy, w->xwayland().id, RevertToNone, CurrentTime);
}

focusDirty = true;
}

Expand Down

0 comments on commit 318fd75

Please sign in to comment.