kranewm

An ICCCM & EWMH compliant X11 reparenting, dynamic window manager, written in C++
git clone git clone git://git.deurzen.net/kranewm.git
Log | Files | Refs | LICENSE

commit fecc870e0c66518ee30dce5c98a9319f94089b7e
parent 864d116b90407682a6a906e918ace9d2d979a200
Author: deurzen <m.deurzen@tum.de>
Date:   Sat, 17 Jul 2021 03:41:47 +0200

adds unmap check upon unmanaging client

Diffstat:
Msrc/core/model.cc | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/core/model.cc b/src/core/model.cc @@ -1573,6 +1573,9 @@ Model::manage(const Window window, const bool ignore) void Model::unmanage(Client_ptr client) { + if (client->consume_unmap_if_expecting()) + return; + for (auto& consumer : client->consumers) check_unconsume_client(consumer); @@ -1585,8 +1588,8 @@ Model::unmanage(Client_ptr client) m_conn.unparent_window(client->window, client->active_region.pos); m_conn.cleanup_window(client->window); - m_conn.destroy_window(client->frame); m_conn.destroy_window(client->window); + m_conn.destroy_window(client->frame); workspace->remove_client(client); workspace->remove_icon(client); @@ -1601,11 +1604,6 @@ Model::unmanage(Client_ptr client) if (client->parent) Util::erase_remove(client->parent->children, client); - for (auto child : client->children) { - unmap_client(child); - unmanage(child); - } - m_client_map.erase(client->window); m_client_map.erase(client->frame);