From a197fe3c11d5ac095bf8e2f491edf28bde9f9b49 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Wed, 20 Dec 2023 17:59:11 +0100 Subject: [PATCH] renderer: don't set surfaces on cursor timeout --- src/render/Renderer.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index a5cc8055..6e054a47 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -2058,8 +2058,6 @@ void CHyprRenderer::ensureCursorRenderingMode() { if (HIDE && !m_bTimeoutRequestedCursorHide) { m_bTimeoutRequestedCursorHide = true; - wlr_cursor_set_surface(g_pCompositor->m_sWLRCursor, nullptr, 0, 0); // hide without saving surface - Debug::log(LOG, "Hiding the cursor (timeout)"); for (auto& m : g_pCompositor->m_vMonitors) @@ -2067,16 +2065,6 @@ void CHyprRenderer::ensureCursorRenderingMode() { } else if (!HIDE && m_bTimeoutRequestedCursorHide) { m_bTimeoutRequestedCursorHide = false; - if (m_bCursorHasSurface) { // restore last used name or surface, fallback to left_ptr if we don't have one - if (m_sLastCursorData.name == "") { - wlr_cursor_set_surface(g_pCompositor->m_sWLRCursor, m_sLastCursorData.surf.value_or(nullptr), m_sLastCursorData.hotspotX, m_sLastCursorData.hotspotY); - } else { - wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, m_sLastCursorData.name.c_str()); - } - } else { - setCursorFromName("left_ptr"); - } - Debug::log(LOG, "Showing the cursor (timeout)"); for (auto& m : g_pCompositor->m_vMonitors)