From fc79118f19f9a33ceb98c25ef38c67d2b935b9da Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 3 Feb 2022 07:14:59 +0000 Subject: [PATCH] Obtain draw lock outside haiku_start_clip * src/haikuterm.c (haiku_start_clip): (haiku_end_clip): Stop obtaining the draw lock. (haiku_draw_glyph_string): Set draw lock here instead. --- src/haikuterm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/haikuterm.c b/src/haikuterm.c index 1b2259bcc59..ac0540b77f8 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -1105,7 +1105,6 @@ static void haiku_start_clip (struct glyph_string *s) { void *view = FRAME_HAIKU_VIEW (s->f); - BView_draw_lock (view); BView_StartClip (view); } @@ -1114,7 +1113,6 @@ haiku_end_clip (struct glyph_string *s) { void *view = FRAME_HAIKU_VIEW (s->f); BView_EndClip (view); - BView_draw_unlock (view); } static void @@ -1448,7 +1446,11 @@ haiku_draw_image_glyph_string (struct glyph_string *s) static void haiku_draw_glyph_string (struct glyph_string *s) { + void *view; + block_input (); + view = FRAME_HAIKU_VIEW (s->f); + BView_draw_lock (view); prepare_face_for_display (s->f, s->face); struct face *face = s->face; @@ -1597,6 +1599,7 @@ haiku_draw_glyph_string (struct glyph_string *s) } } haiku_end_clip (s); + BView_draw_unlock (view); unblock_input (); } -- 2.39.5