Added a fix for X11 / Cinnamon window popups and maximize button not visible.

This commit is contained in:
2026-09-07 22:19:05 +02:00
parent f06fc2e4e3
commit 1cfe8625e9
10 changed files with 678 additions and 34 deletions

View File

@@ -0,0 +1,50 @@
From: PT Linux Launcher maintainers
Subject: Avoid idle waits for direct Wayland resize configures
The lazy-output-images backport leaves no shared output images allocated while
Gamescope is presenting the game directly as Wayland planes. A host-window
configure nevertheless calls vulkan_remake_output_images(), whose unconditional
device-idle wait and output-sized blank-texture recreation stall the compositor
thread for every intermediate drag size.
Wait only when an output or screenshot image actually exists. The transparent
fallback texture is unused by the non-session Wayland backend, so retain it
across Wayland size changes; session backends preserve the existing recreation
behavior. If a frame later requires full composition, the lazy allocation path
creates correctly sized output images before rendering it.
--- a/src/rendervulkan.cpp
+++ b/src/rendervulkan.cpp
@@ -3374,7 +3374,21 @@ static bool vulkan_ensure_output_images()
bool vulkan_remake_output_images()
{
VulkanOutput_t *pOutput = &g_output;
- g_device.waitIdle();
+ bool bHasLiveImages =
+ !pOutput->outputImages.empty() && pOutput->outputImages[0];
+ if ( !bHasLiveImages )
+ {
+ for ( const auto &pScreenshotImage : pOutput->pScreenshotImages )
+ {
+ if ( pScreenshotImage )
+ {
+ bHasLiveImages = true;
+ break;
+ }
+ }
+ }
+ if ( bHasLiveImages )
+ g_device.waitIdle();
pOutput->nOutImage = 0;
@@ -3386,7 +3400,8 @@ bool vulkan_remake_output_images()
{
pOutput->outputImages.clear();
pOutput->outputImagesPartialOverlay.clear();
- pOutput->temporaryHackyBlankImage = vulkan_create_debug_blank_texture();
+ if ( GetBackend()->IsSessionBased() || !pOutput->temporaryHackyBlankImage )
+ pOutput->temporaryHackyBlankImage = vulkan_create_debug_blank_texture();
return true;
}