cursor: minor fixes for unhiding surfaces

the surface equality check is done in CPointerManager, the one in renderer can be wrong

fixes #5975
This commit is contained in:
Vaxry 2024-05-14 16:45:01 +01:00
parent d0a4a0e0d8
commit 4cdddcfe46
2 changed files with 1 additions and 4 deletions

View file

@ -223,7 +223,7 @@ void CPointerManager::setCursorSurface(CWLSurface* surf, const Vector2D& hotspot
},
nullptr, "CPointerManager");
if (surf->wlr()->current.buffer) {
if (wlr_surface_has_buffer(surf->wlr())) {
timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
wlr_surface_send_frame_done(surf->wlr(), &now);

View file

@ -2255,9 +2255,6 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
void CHyprRenderer::setCursorSurface(CWLSurface* surf, int hotspotX, int hotspotY, bool force) {
m_bCursorHasSurface = surf;
if (surf == m_sLastCursorData.surf && hotspotX == m_sLastCursorData.hotspotX && hotspotY == m_sLastCursorData.hotspotY && !force)
return;
m_sLastCursorData.name = "";
m_sLastCursorData.surf = surf;
m_sLastCursorData.hotspotX = hotspotX;