mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-01 20:51:58 -07:00
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:
@@ -223,7 +223,7 @@ void CPointerManager::setCursorSurface(CWLSurface* surf, const Vector2D& hotspot
|
|||||||
},
|
},
|
||||||
nullptr, "CPointerManager");
|
nullptr, "CPointerManager");
|
||||||
|
|
||||||
if (surf->wlr()->current.buffer) {
|
if (wlr_surface_has_buffer(surf->wlr())) {
|
||||||
timespec now;
|
timespec now;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
wlr_surface_send_frame_done(surf->wlr(), &now);
|
wlr_surface_send_frame_done(surf->wlr(), &now);
|
||||||
|
@@ -2255,9 +2255,6 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
|
|||||||
void CHyprRenderer::setCursorSurface(CWLSurface* surf, int hotspotX, int hotspotY, bool force) {
|
void CHyprRenderer::setCursorSurface(CWLSurface* surf, int hotspotX, int hotspotY, bool force) {
|
||||||
m_bCursorHasSurface = surf;
|
m_bCursorHasSurface = surf;
|
||||||
|
|
||||||
if (surf == m_sLastCursorData.surf && hotspotX == m_sLastCursorData.hotspotX && hotspotY == m_sLastCursorData.hotspotY && !force)
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_sLastCursorData.name = "";
|
m_sLastCursorData.name = "";
|
||||||
m_sLastCursorData.surf = surf;
|
m_sLastCursorData.surf = surf;
|
||||||
m_sLastCursorData.hotspotX = hotspotX;
|
m_sLastCursorData.hotspotX = hotspotX;
|
||||||
|
Reference in New Issue
Block a user