kranewl

A wlroots-based dynamic Wayland compositor, written in C++, configurable with Lua
git clone git://git.deurzen.net/kranewl
Log | Files | Refs | LICENSE

commit 033d9e0944da1a6974f3e159a2598ae4dfd3e72e
parent 470d85e9bf60dac1e4c4104b2902c84539f22a5b
Author: deurzen <max@deurzen.net>
Date:   Wed,  1 Jun 2022 03:15:05 +0200

resolves context switching segfault

Diffstat:
Msrc/kranewl/model.cc | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/kranewl/model.cc b/src/kranewl/model.cc @@ -900,13 +900,16 @@ Model::activate_context(Context_ptr next_context) abort_cursor_interactive(); - Context_ptr prev_context = mp_output->context(); + for (View_ptr view : *mp_workspace) + view->unmap(); + + Context_ptr prev_context = mp_context; mp_prev_context = prev_context; Output_ptr next_output = mp_output; Output_ptr prev_output = next_context->output(); - if (next_output != prev_output) + if (prev_output && next_output != prev_output) prev_output->set_context(prev_context); next_output->set_context(next_context);