mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-14 04:25:57 +01:00
guard toplevel funcs
This commit is contained in:
parent
6357a92e46
commit
6aa448534f
1 changed files with 6 additions and 0 deletions
|
@ -152,6 +152,9 @@ void CWindow::createToplevelHandle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWindow::destroyToplevelHandle() {
|
void CWindow::destroyToplevelHandle() {
|
||||||
|
if (!m_phForeignToplevel)
|
||||||
|
return;
|
||||||
|
|
||||||
hyprListener_toplevelActivate.removeCallback();
|
hyprListener_toplevelActivate.removeCallback();
|
||||||
hyprListener_toplevelClose.removeCallback();
|
hyprListener_toplevelClose.removeCallback();
|
||||||
hyprListener_toplevelFullscreen.removeCallback();
|
hyprListener_toplevelFullscreen.removeCallback();
|
||||||
|
@ -161,6 +164,9 @@ void CWindow::destroyToplevelHandle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWindow::updateToplevel() {
|
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_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_title(m_phForeignToplevel, m_szTitle.c_str());
|
||||||
wlr_foreign_toplevel_handle_v1_set_fullscreen(m_phForeignToplevel, m_bIsFullscreen);
|
wlr_foreign_toplevel_handle_v1_set_fullscreen(m_phForeignToplevel, m_bIsFullscreen);
|
||||||
|
|
Loading…
Reference in a new issue