From a8c3e8e2a6efa77b38110a9c1fee1ece8d8da4d5 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 31 Dec 2021 10:59:53 +0000 Subject: [PATCH] Fix child frame unlinking on Haiku * src/haiku_support.cc (UnlinkChild): Fix obvious mistake. (DoMove): Lock child frame window before moving it. --- src/haiku_support.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 66b0e519b07..fea0684b1b4 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -346,8 +346,8 @@ public: { if (last) last->next = tem->next; - if (tem == subset_windows) - subset_windows = NULL; + else + subset_windows = tem->next; delete tem; return; } @@ -405,9 +405,11 @@ public: DoMove (struct child_frame *f) { BRect frame = this->Frame (); + if (!f->window->LockLooper ()) + gui_abort ("Failed to lock child frame window for move"); f->window->MoveTo (frame.left + f->xoff, frame.top + f->yoff); - this->Sync (); + f->window->UnlockLooper (); } void -- 2.39.2