mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 15:05:59 +01:00
Try to fix the crash again
This commit is contained in:
parent
c58b15c6da
commit
db4b4ec0d3
1 changed files with 16 additions and 12 deletions
|
@ -49,20 +49,24 @@ void CHyprXWaylandManager::getGeometryForWindow(CWindow* pWindow, wlr_box* pbox)
|
|||
}
|
||||
|
||||
std::string CHyprXWaylandManager::getTitle(CWindow* pWindow) {
|
||||
if (pWindow->m_bIsX11) {
|
||||
if (pWindow->m_uSurface.xwayland) {
|
||||
return pWindow->m_uSurface.xwayland->title;
|
||||
try {
|
||||
if (pWindow->m_bIsX11) {
|
||||
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 pWindow->m_uSurface.xdg->toplevel->title;
|
||||
|
||||
if (pWindow->m_uSurface.xdg) {
|
||||
if (pWindow->m_uSurface.xdg->toplevel) {
|
||||
return std::string(pWindow->m_uSurface.xdg->toplevel->title);
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
} catch (std::logic_error& e) {
|
||||
Debug::log(ERR, "Error in getTitle: %s", e.what());
|
||||
}
|
||||
|
||||
return "";
|
||||
|
|
Loading…
Reference in a new issue