mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 23:05:58 +01:00
fix getTitle crash
This commit is contained in:
parent
50b48818a2
commit
a86bc76b9a
2 changed files with 4 additions and 7 deletions
|
@ -240,9 +240,9 @@ void Events::listener_setTitleWindow(void* owner, void* data) {
|
||||||
if (!g_pCompositor->windowValidMapped(PWINDOW))
|
if (!g_pCompositor->windowValidMapped(PWINDOW))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Debug::log(LOG, "Window %x set title to %s", PWINDOW, PWINDOW->m_szTitle.c_str());
|
|
||||||
|
|
||||||
PWINDOW->m_szTitle = g_pXWaylandManager->getTitle(PWINDOW);
|
PWINDOW->m_szTitle = g_pXWaylandManager->getTitle(PWINDOW);
|
||||||
|
|
||||||
|
Debug::log(LOG, "Window %x set title to %s", PWINDOW, PWINDOW->m_szTitle.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_fullscreenWindow(void* owner, void* data) {
|
void Events::listener_fullscreenWindow(void* owner, void* data) {
|
||||||
|
|
|
@ -78,11 +78,8 @@ std::string CHyprXWaylandManager::getTitle(CWindow* pWindow) {
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
} catch (std::exception& e) {
|
} catch (...) {
|
||||||
if (e.what())
|
Debug::log(ERR, "Error in getTitle (probably null title)");
|
||||||
Debug::log(ERR, "Error in getTitle: %s", e.what());
|
|
||||||
else
|
|
||||||
Debug::log(ERR, "Error in getTitle [e.what() nullptr]");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|
Loading…
Reference in a new issue