guard toplevel funcs

This commit is contained in:
vaxerski 2022-08-06 21:10:37 +02:00
parent 6357a92e46
commit 6aa448534f

View File

@ -152,6 +152,9 @@ void CWindow::createToplevelHandle() {
}
void CWindow::destroyToplevelHandle() {
if (!m_phForeignToplevel)
return;
hyprListener_toplevelActivate.removeCallback();
hyprListener_toplevelClose.removeCallback();
hyprListener_toplevelFullscreen.removeCallback();
@ -161,6 +164,9 @@ void CWindow::destroyToplevelHandle() {
}
void CWindow::updateToplevel() {
if (!m_phForeignToplevel)
return;
wlr_foreign_toplevel_handle_v1_set_app_id(m_phForeignToplevel, g_pXWaylandManager->getAppIDClass(this).c_str());
wlr_foreign_toplevel_handle_v1_set_title(m_phForeignToplevel, m_szTitle.c_str());
wlr_foreign_toplevel_handle_v1_set_fullscreen(m_phForeignToplevel, m_bIsFullscreen);