aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2022-01-01 07:09:38 +0000
committerPo Lu2022-01-01 07:10:39 +0000
commitcbc77dcf033aed0a595f31437c92f1981503ab88 (patch)
tree48be898804e539b19a522d3130de51a9539bb969
parentc7e642bab2fb7d11eca64036543ee20e116800bc (diff)
downloademacs-cbc77dcf033aed0a595f31437c92f1981503ab88.tar.gz
emacs-cbc77dcf033aed0a595f31437c92f1981503ab88.zip
Fix child frame synchronization order on Haiku
* src/haiku_support.cc (DoMove): (FrameMoved): Fix locking and sync order semantics.
-rw-r--r--src/haiku_support.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index 32e61d96604..2a74d0bd515 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -414,11 +414,8 @@ public:
414 DoMove (struct child_frame *f) 414 DoMove (struct child_frame *f)
415 { 415 {
416 BRect frame = this->Frame (); 416 BRect frame = this->Frame ();
417 if (!f->window->LockLooper ())
418 gui_abort ("Failed to lock child frame window for move");
419 f->window->MoveTo (frame.left + f->xoff, 417 f->window->MoveTo (frame.left + f->xoff,
420 frame.top + f->yoff); 418 frame.top + f->yoff);
421 f->window->UnlockLooper ();
422 } 419 }
423 420
424 void 421 void
@@ -652,21 +649,24 @@ public:
652 649
653 if (!child_frame_lock.Lock ()) 650 if (!child_frame_lock.Lock ())
654 gui_abort ("Failed to lock child frame state lock"); 651 gui_abort ("Failed to lock child frame state lock");
655
656 for (struct child_frame *f = subset_windows; 652 for (struct child_frame *f = subset_windows;
657 f; f = f->next) 653 f; f = f->next)
658 DoMove (f); 654 DoMove (f);
659
660 child_frame_lock.Unlock (); 655 child_frame_lock.Unlock ();
656
657 Sync ();
661 BWindow::FrameMoved (newPosition); 658 BWindow::FrameMoved (newPosition);
662 } 659 }
663 660
664 void 661 void
665 WorkspacesChanged (uint32_t old, uint32_t n) 662 WorkspacesChanged (uint32_t old, uint32_t n)
666 { 663 {
664 if (!child_frame_lock.Lock ())
665 gui_abort ("Failed to lock child frames for changing workspaces");
667 for (struct child_frame *f = subset_windows; 666 for (struct child_frame *f = subset_windows;
668 f; f = f->next) 667 f; f = f->next)
669 DoUpdateWorkspace (f); 668 DoUpdateWorkspace (f);
669 child_frame_lock.Unlock ();
670 } 670 }
671 671
672 void 672 void