From 770956b0921139ea13b478dda0e301842546d74c Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 15 Feb 2024 01:26:48 +0000 Subject: [PATCH] input: don't schedule frame on cursor move on hw cursors spams unnecessary frames. Maybe we should ignore empty damage frame requests too? ref #3747 #3490 --- src/managers/input/InputManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index baf648df..d6ddba46 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -315,7 +315,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { foundSurface = g_pCompositor->vectorToLayerSurface(mouseCoords, &PMONITOR->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND], &surfaceCoords, &pFoundLayerSurface); - g_pCompositor->scheduleFrameForMonitor(g_pCompositor->m_pLastMonitor); + if (g_pCompositor->m_pLastMonitor->output->software_cursor_locks > 0) + g_pCompositor->scheduleFrameForMonitor(g_pCompositor->m_pLastMonitor); if (!foundSurface) { if (!m_bEmptyFocusCursorSet) {