Skip to content

Commit

Permalink
wlserver: Only send Gamescope screenshot feedback if it was initiated…
Browse files Browse the repository at this point in the history
… from wl
  • Loading branch information
misyltoad committed Apr 2, 2024
1 parent a068770 commit 9567fb3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/steamcompmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3006,7 +3006,7 @@ paint_all(bool async)
XDeleteProperty( root_ctx->dpy, root_ctx->root, root_ctx->atoms.gamescopeDebugScreenShotAtom );
}

if ( bScreenshotSuccess )
if ( bScreenshotSuccess && oScreenshotInfo->bWaylandRequested )
{
wlserver_lock();
for ( const auto &control : wlserver.gamescope_controls )
Expand Down
1 change: 1 addition & 0 deletions src/steamcompmgr_shared.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ namespace gamescope
gamescope_control_screenshot_type eScreenshotType = GAMESCOPE_CONTROL_SCREENSHOT_TYPE_BASE_PLANE_ONLY;
uint32_t uScreenshotFlags = 0;
bool bX11PropertyRequested = false;
bool bWaylandRequested = false;
};

class CScreenshotManager
Expand Down
1 change: 1 addition & 0 deletions src/wlserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@ static void gamescope_control_take_screenshot( struct wl_client *client, struct
.szScreenshotPath = path,
.eScreenshotType = (gamescope_control_screenshot_type)type,
.uScreenshotFlags = flags,
.bWaylandRequested = true,
} );
}

Expand Down

0 comments on commit 9567fb3

Please sign in to comment.