Skip to content

Commit c5aa97e

Browse files
committed
window-list: Handle null parent
1 parent 9b0c08b commit c5aa97e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/panel/widgets/window-list/toplevel.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,12 +535,17 @@ static void handle_toplevel_closed(void *data, toplevel_t handle)
535535
static void handle_toplevel_parent(void *data, toplevel_t handle, toplevel_t parent)
536536
{
537537
auto impl = static_cast<WayfireToplevel::impl*> (data);
538+
impl->set_parent(parent);
539+
if (!parent)
540+
{
541+
impl->handle_output_enter(impl->window_list->output->wo);
542+
return;
543+
}
538544
if (impl->window_list->toplevels[parent])
539545
{
540546
auto& children = impl->window_list->toplevels[parent]->get_children();
541547
children.push_back(handle);
542548
}
543-
impl->set_parent(parent);
544549
impl->remove_button();
545550
}
546551

0 commit comments

Comments
 (0)