emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master cbc77dcf03: Fix child frame synchronization order on Haiku


From: Po Lu
Subject: master cbc77dcf03: Fix child frame synchronization order on Haiku
Date: Sat, 1 Jan 2022 02:12:41 -0500 (EST)

branch: master
commit cbc77dcf033aed0a595f31437c92f1981503ab88
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix child frame synchronization order on Haiku
    
    * src/haiku_support.cc (DoMove):
    (FrameMoved): Fix locking and sync order semantics.
---
 src/haiku_support.cc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index 32e61d9660..2a74d0bd51 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -414,11 +414,8 @@ 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);
-    f->window->UnlockLooper ();
   }
 
   void
@@ -652,21 +649,24 @@ public:
 
     if (!child_frame_lock.Lock ())
       gui_abort ("Failed to lock child frame state lock");
-
     for (struct child_frame *f = subset_windows;
         f; f = f->next)
       DoMove (f);
-
     child_frame_lock.Unlock ();
+
+    Sync ();
     BWindow::FrameMoved (newPosition);
   }
 
   void
   WorkspacesChanged (uint32_t old, uint32_t n)
   {
+    if (!child_frame_lock.Lock ())
+      gui_abort ("Failed to lock child frames for changing workspaces");
     for (struct child_frame *f = subset_windows;
         f; f = f->next)
       DoUpdateWorkspace (f);
+    child_frame_lock.Unlock ();
   }
 
   void



reply via email to

[Prev in Thread] Current Thread [Next in Thread]