diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 4ce53697..f95e4924 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -240,9 +240,9 @@ void Events::listener_setTitleWindow(void* owner, void* data) { if (!g_pCompositor->windowValidMapped(PWINDOW)) return; - Debug::log(LOG, "Window %x set title to %s", PWINDOW, PWINDOW->m_szTitle.c_str()); - 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) { diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 4e39a043..c3d66c5b 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -78,11 +78,8 @@ std::string CHyprXWaylandManager::getTitle(CWindow* pWindow) { } else { return ""; } - } catch (std::exception& e) { - if (e.what()) - Debug::log(ERR, "Error in getTitle: %s", e.what()); - else - Debug::log(ERR, "Error in getTitle [e.what() nullptr]"); + } catch (...) { + Debug::log(ERR, "Error in getTitle (probably null title)"); } return "";