mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 00:21:56 -07:00
Try to fix the crash again
This commit is contained in:
@@ -49,20 +49,24 @@ void CHyprXWaylandManager::getGeometryForWindow(CWindow* pWindow, wlr_box* pbox)
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string CHyprXWaylandManager::getTitle(CWindow* pWindow) {
|
std::string CHyprXWaylandManager::getTitle(CWindow* pWindow) {
|
||||||
if (pWindow->m_bIsX11) {
|
try {
|
||||||
if (pWindow->m_uSurface.xwayland) {
|
if (pWindow->m_bIsX11) {
|
||||||
return pWindow->m_uSurface.xwayland->title;
|
if (pWindow->m_uSurface.xwayland) {
|
||||||
|
return std::string(pWindow->m_uSurface.xwayland->title);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return "";
|
if (pWindow->m_uSurface.xdg) {
|
||||||
}
|
if (pWindow->m_uSurface.xdg->toplevel) {
|
||||||
|
return std::string(pWindow->m_uSurface.xdg->toplevel->title);
|
||||||
if (pWindow->m_uSurface.xdg) {
|
}
|
||||||
if (pWindow->m_uSurface.xdg->toplevel) {
|
} else {
|
||||||
return pWindow->m_uSurface.xdg->toplevel->title;
|
return "";
|
||||||
}
|
}
|
||||||
} else {
|
} catch (std::logic_error& e) {
|
||||||
return "";
|
Debug::log(ERR, "Error in getTitle: %s", e.what());
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
Reference in New Issue
Block a user