aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-07-22 19:05:24 +0200
committerVaxry <[email protected]>2024-07-22 19:05:45 +0200
commitf17f8b219c699ab52f3d784cad90bdef5bb78188 (patch)
tree4e4da07ea06ccf80bad9c0bff3985cae9ffa42f2
parente8374e07927826f43d30803b6db00c3b88482e7e (diff)
downloadHyprland-f17f8b219c699ab52f3d784cad90bdef5bb78188.tar.gz
Hyprland-f17f8b219c699ab52f3d784cad90bdef5bb78188.zip
pointer/hw: extend cursor swapchain to 3
otherwise on some commits we draw twice and we draw over the front buffer
-rw-r--r--src/managers/PointerManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp
index b1542fed..55bd0509 100644
--- a/src/managers/PointerManager.cpp
+++ b/src/managers/PointerManager.cpp
@@ -373,7 +373,10 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
auto options = state->monitor->cursorSwapchain->currentOptions();
options.size = maxSize;
- options.length = 2;
+ // TODO: this is a band-aid. If the current cursor image has not yet been committed (no rendering has yet been done)
+ // we should revert the swapchain and avoid rendering to the front buffer.
+ // as a band-aid, extend the swapchain to 3 as we sometimes double-render on a cursor shape change.
+ options.length = 3;
options.scanout = true;
options.cursor = true;
options.multigpu = state->monitor->output->getBackend()->preferredAllocator()->drmFD() != g_pCompositor->m_iDRMFD;