mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 16:06:00 +01:00
renderer: don't set surfaces on cursor timeout
This commit is contained in:
parent
53c78ab906
commit
a197fe3c11
1 changed files with 0 additions and 12 deletions
|
@ -2058,8 +2058,6 @@ void CHyprRenderer::ensureCursorRenderingMode() {
|
||||||
if (HIDE && !m_bTimeoutRequestedCursorHide) {
|
if (HIDE && !m_bTimeoutRequestedCursorHide) {
|
||||||
m_bTimeoutRequestedCursorHide = true;
|
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)");
|
Debug::log(LOG, "Hiding the cursor (timeout)");
|
||||||
|
|
||||||
for (auto& m : g_pCompositor->m_vMonitors)
|
for (auto& m : g_pCompositor->m_vMonitors)
|
||||||
|
@ -2067,16 +2065,6 @@ void CHyprRenderer::ensureCursorRenderingMode() {
|
||||||
} else if (!HIDE && m_bTimeoutRequestedCursorHide) {
|
} else if (!HIDE && m_bTimeoutRequestedCursorHide) {
|
||||||
m_bTimeoutRequestedCursorHide = false;
|
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)");
|
Debug::log(LOG, "Showing the cursor (timeout)");
|
||||||
|
|
||||||
for (auto& m : g_pCompositor->m_vMonitors)
|
for (auto& m : g_pCompositor->m_vMonitors)
|
||||||
|
|
Loading…
Reference in a new issue