gtk: fix warning when replacing children of Paned

This commit is contained in:
Thorsten Ball
2023-10-27 06:34:57 +02:00
committed by Mitchell Hashimoto
parent d88c29377b
commit adba77c3f9

View File

@ -152,6 +152,10 @@ pub fn replaceChildInPosition(self: *Paned, child: Child, position: Position) vo
// Keep position of divider
const parent_paned_position_before = c.gtk_paned_get_position(self.paned);
// Focus on the sibling, otherwise we'll get a GTK warning
self.focusSurfaceInPosition(if (position == .start) .end else .start);
// Now we can remove the other one
self.removeChildInPosition(position);
switch (position) {