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 e013a7f803a39668257a7272b01df319c682eb34
parent aff394881b7ffe30c7f2c7c7da9793f23916ee20
Author: deurzen <m.deurzen@tum.de>
Date:   Fri, 30 Jul 2021 22:24:01 +0200

fixes instant window destroy bug

Diffstat:
Msrc/core/model.cc | 24+++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/core/model.cc b/src/core/model.cc @@ -1524,7 +1524,7 @@ Model::manage(const Window window, const bool ignore) if (pid) m_pid_map[*pid] = client; - m_conn.place_window(client->frame, client->free_region); + m_conn.place_window(frame, client->free_region); m_conn.unmap_window(window); m_conn.unmap_window(frame); m_conn.reparent_window(window, frame, Pos { extents.left, extents.top }); @@ -1550,7 +1550,6 @@ Model::manage(const Window window, const bool ignore) if (!m_move_buffer.is_occupied() && !m_resize_buffer.is_occupied() - && !(producer && producer->producing) ) { focus_client(client); } @@ -3370,8 +3369,17 @@ Model::handle_map_request(MapRequestEvent event) } } - if (strut) + if (strut) { screen.add_strut(*edge, *strut); + + if (screen.showing_struts()) { + screen.compute_placeable_region(); + m_conn.map_window(strut->window); + + apply_layout(mp_workspace); + } else + m_conn.unmap_window(strut->window); + } } layer = StackHandler::StackLayer::Dock; @@ -3385,16 +3393,6 @@ Model::handle_map_request(MapRequestEvent event) must_restack = true; } - Screen& screen = mp_partition->screen(); - - if (screen.showing_struts()) { - screen.compute_placeable_region(); - m_conn.map_window(event.window); - - apply_layout(mp_workspace); - } else - m_conn.unmap_window(event.window); - if (must_restack) apply_stack(mp_workspace);