mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 04:25:59 +01:00
renderer: use optional for cursor surface storing
because nullptr is a valid surface. fixes #3692
This commit is contained in:
parent
86318ce04f
commit
8e91c038db
2 changed files with 3 additions and 3 deletions
|
@ -1956,7 +1956,7 @@ void CHyprRenderer::setCursorFromName(const std::string& name) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_sLastCursorData.name = name;
|
m_sLastCursorData.name = name;
|
||||||
m_sLastCursorData.surf = nullptr;
|
m_sLastCursorData.surf.reset();
|
||||||
|
|
||||||
wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, name.c_str());
|
wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, name.c_str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ class CHyprRenderer {
|
||||||
CTimer m_tRenderTimer;
|
CTimer m_tRenderTimer;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
wlr_surface* surf = nullptr;
|
std::optional<wlr_surface*> surf = nullptr;
|
||||||
std::string name;
|
std::string name;
|
||||||
} m_sLastCursorData;
|
} m_sLastCursorData;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue