mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 06:29:50 +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;
|
||||
|
||||
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());
|
||||
}
|
||||
|
|
|
@ -84,8 +84,8 @@ class CHyprRenderer {
|
|||
CTimer m_tRenderTimer;
|
||||
|
||||
struct {
|
||||
wlr_surface* surf = nullptr;
|
||||
std::string name;
|
||||
std::optional<wlr_surface*> surf = nullptr;
|
||||
std::string name;
|
||||
} m_sLastCursorData;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue