mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-26 09:41:57 -07:00
renderer: use optional for cursor surface storing
because nullptr is a valid surface. fixes #3692
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user