mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 23:21:57 -07:00
Fix a crash with setting title
This commit is contained in:
@@ -49,10 +49,23 @@ void CHyprXWaylandManager::getGeometryForWindow(CWindow* pWindow, wlr_box* pbox)
|
||||
}
|
||||
|
||||
std::string CHyprXWaylandManager::getTitle(CWindow* pWindow) {
|
||||
if (pWindow->m_bIsX11)
|
||||
return pWindow->m_uSurface.xwayland->title;
|
||||
if (pWindow->m_bIsX11) {
|
||||
if (pWindow->m_uSurface.xwayland) {
|
||||
return pWindow->m_uSurface.xwayland->title;
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (pWindow->m_uSurface.xdg) {
|
||||
if (pWindow->m_uSurface.xdg->toplevel) {
|
||||
return pWindow->m_uSurface.xdg->toplevel->title;
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
||||
return pWindow->m_uSurface.xdg->toplevel->title;
|
||||
return "";
|
||||
}
|
||||
|
||||
void CHyprXWaylandManager::sendCloseWindow(CWindow* pWindow) {
|
||||
@@ -114,4 +127,4 @@ void CHyprXWaylandManager::moveXWaylandWindow(CWindow* pWindow, const Vector2D&
|
||||
if (pWindow->m_bIsX11) {
|
||||
wlr_xwayland_surface_configure(pWindow->m_uSurface.xwayland, pos.x, pos.y, pWindow->m_vRealSize.x, pWindow->m_vRealSize.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user