mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-11-16 22:25:59 +01:00
internal: destroy cursor theme on LS destroy
This commit is contained in:
parent
10fd31a544
commit
3bfaac09f5
3 changed files with 8 additions and 1 deletions
|
@ -146,7 +146,9 @@ void CHyprpaper::recheckMonitor(SMonitor* pMonitor) {
|
||||||
XCURSOR_SIZE = 24;
|
XCURSOR_SIZE = 24;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pMonitor->pCurrentLayerSurface->pCursorImg = wl_cursor_theme_get_cursor(wl_cursor_theme_load(getenv("XCURSOR_THEME"), XCURSOR_SIZE * pMonitor->scale, m_sSHM), "left_ptr")->images[0];
|
|
||||||
|
pMonitor->pCurrentLayerSurface->pCursorTheme = wl_cursor_theme_load(getenv("XCURSOR_THEME"), XCURSOR_SIZE * pMonitor->scale, m_sSHM);
|
||||||
|
pMonitor->pCurrentLayerSurface->pCursorImg = wl_cursor_theme_get_cursor(pMonitor->pCurrentLayerSurface->pCursorTheme, "left_ptr")->images[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,10 @@ CLayerSurface::CLayerSurface(SMonitor* pMonitor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CLayerSurface::~CLayerSurface() {
|
CLayerSurface::~CLayerSurface() {
|
||||||
|
|
||||||
|
if (pCursorTheme)
|
||||||
|
wl_cursor_theme_destroy(pCursorTheme);
|
||||||
|
|
||||||
if (g_pHyprpaper->m_sFractionalScale && pFractionalScaleInfo) {
|
if (g_pHyprpaper->m_sFractionalScale && pFractionalScaleInfo) {
|
||||||
wp_fractional_scale_v1_destroy(pFractionalScaleInfo);
|
wp_fractional_scale_v1_destroy(pFractionalScaleInfo);
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ public:
|
||||||
zwlr_layer_surface_v1* pLayerSurface = nullptr;
|
zwlr_layer_surface_v1* pLayerSurface = nullptr;
|
||||||
wl_surface* pSurface = nullptr;
|
wl_surface* pSurface = nullptr;
|
||||||
|
|
||||||
|
wl_cursor_theme* pCursorTheme = nullptr;
|
||||||
wl_cursor_image* pCursorImg = nullptr;
|
wl_cursor_image* pCursorImg = nullptr;
|
||||||
wl_surface* pCursorSurface = nullptr;
|
wl_surface* pCursorSurface = nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue