Skip to content

Commit

Permalink
Revert "steamcompmgr: Move outdatedInteractiveFocus to window"
Browse files Browse the repository at this point in the history
This reverts commit 299bc34.
  • Loading branch information
alkazar committed Sep 26, 2024
1 parent f5e4f47 commit 7e3acf5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
39 changes: 24 additions & 15 deletions src/steamcompmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3273,7 +3273,7 @@ found:;
if ( window_has_commits( focus ) )
out->focusWindow = focus;
else
focus->outdatedInteractiveFocus = true;
out->outdatedInteractiveFocus = true;

// Always update X's idea of focus, but still dirty
// the it being outdated so we can resolve that globally later.
Expand Down Expand Up @@ -6025,28 +6025,37 @@ bool handle_done_commit( steamcompmgr_win_t *w, xwayland_ctx_t *ctx, uint64_t co
// Window just got a new available commit, determine if that's worth a repaint

// If this is an overlay that we're presenting, repaint
if ( w == global_focus.overlayWindow && w->opacity != TRANSLUCENT )
if ( gameFocused )
{
hasRepaintNonBasePlane = true;
}
if ( w == global_focus.overlayWindow && w->opacity != TRANSLUCENT )
{
hasRepaintNonBasePlane = true;
}

if ( w == global_focus.notificationWindow && w->opacity != TRANSLUCENT )
{
hasRepaintNonBasePlane = true;
if ( w == global_focus.notificationWindow && w->opacity != TRANSLUCENT )
{
hasRepaintNonBasePlane = true;
}
}

// If this is an external overlay, repaint
if ( w == global_focus.externalOverlayWindow && w->opacity != TRANSLUCENT )
if ( ctx )
{
hasRepaintNonBasePlane = true;
if ( ctx->focus.outdatedInteractiveFocus )
{
MakeFocusDirty();
ctx->focus.outdatedInteractiveFocus = false;
}
}

if ( w->outdatedInteractiveFocus )
if ( global_focus.outdatedInteractiveFocus )
{
MakeFocusDirty();
w->outdatedInteractiveFocus = false;
}
global_focus.outdatedInteractiveFocus = false;

// If this is an external overlay, repaint
if ( w == global_focus.externalOverlayWindow && w->opacity != TRANSLUCENT )
{
hasRepaintNonBasePlane = true;
}
}
// If this is the main plane, repaint
if ( w == global_focus.focusWindow && !w->isSteamStreamingClient )
{
Expand Down
1 change: 0 additions & 1 deletion src/steamcompmgr_shared.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ struct steamcompmgr_win_t {
unsigned int requestedHeight = 0;
bool is_dialog = false;
bool maybe_a_dropdown = false;
bool outdatedInteractiveFocus = false;

bool hasHwndStyle = false;
uint32_t hwndStyle = 0;
Expand Down

0 comments on commit 7e3acf5

Please sign in to comment.