]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix child frame unlinking on Haiku
authorPo Lu <luangruo@yahoo.com>
Fri, 31 Dec 2021 10:59:53 +0000 (10:59 +0000)
committerPo Lu <luangruo@yahoo.com>
Fri, 31 Dec 2021 10:59:53 +0000 (10:59 +0000)
* src/haiku_support.cc (UnlinkChild): Fix obvious mistake.
(DoMove): Lock child frame window before moving it.

src/haiku_support.cc

index 66b0e519b07661048d2e563e00f0198ef8aa8520..fea0684b1b4a911590053eab1e1020edfc2e9e02 100644 (file)
@@ -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