[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d7e1ed17d9 1/2: Flush frames after mouse face is cleared on a chi
From: |
Po Lu |
Subject: |
master d7e1ed17d9 1/2: Flush frames after mouse face is cleared on a child frame in Haiku |
Date: |
Sat, 1 Jan 2022 00:38:27 -0500 (EST) |
branch: master
commit d7e1ed17d9d60ab0fe306d1216f695fd96d51956
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Flush frames after mouse face is cleared on a child frame in Haiku
* src/haiku_support.cc (~EmacsWindow):
(UpwardsSubsetChildren):
(UpwardsUnSubsetChildren): Fix locking semantics.
* src/haikuterm.c (haiku_read_socket): Flush dirty back buffers
after clearing mouse face because the pointer was moved out of a
frame.
---
src/haiku_support.cc | 9 +++++++++
src/haikuterm.c | 2 ++
2 files changed, 11 insertions(+)
diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index dae0825bd2..32e61d9660 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -259,7 +259,10 @@ public:
struct child_frame *next;
for (struct child_frame *f = subset_windows; f; f = next)
{
+ if (f->window->LockLooper ())
+ gui_abort ("Failed to lock looper for unparent");
f->window->Unparent ();
+ f->window->UnlockLooper ();
next = f->next;
delete f;
}
@@ -279,6 +282,8 @@ public:
void
UpwardsSubsetChildren (EmacsWindow *w)
{
+ if (!LockLooper ())
+ gui_abort ("Failed to lock looper for subset");
if (!child_frame_lock.Lock ())
gui_abort ("Failed to lock child frame state lock");
UpwardsSubset (w);
@@ -286,6 +291,7 @@ public:
f = f->next)
f->window->UpwardsSubsetChildren (w);
child_frame_lock.Unlock ();
+ UnlockLooper ();
}
void
@@ -298,6 +304,8 @@ public:
void
UpwardsUnSubsetChildren (EmacsWindow *w)
{
+ if (!LockLooper ())
+ gui_abort ("Failed to lock looper for unsubset");
if (!child_frame_lock.Lock ())
gui_abort ("Failed to lock child frame state lock");
UpwardsUnSubset (w);
@@ -305,6 +313,7 @@ public:
f = f->next)
f->window->UpwardsUnSubsetChildren (w);
child_frame_lock.Unlock ();
+ UnlockLooper ();
}
void
diff --git a/src/haikuterm.c b/src/haikuterm.c
index 9b54e50b61..574bf40f7b 100644
--- a/src/haikuterm.c
+++ b/src/haikuterm.c
@@ -2757,6 +2757,8 @@ haiku_read_socket (struct terminal *terminal, struct
input_event *hold_quit)
certainly no longer on any text in the frame. */
clear_mouse_face (hlinfo);
hlinfo->mouse_face_mouse_frame = 0;
+
+ need_flush = 1;
}
haiku_new_focus_frame (x_display_list->focused_frame);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d7e1ed17d9 1/2: Flush frames after mouse face is cleared on a child frame in Haiku,
Po Lu <=