]> git.eshelyaron.com Git - emacs.git/commitdiff
Obtain draw lock outside haiku_start_clip
authorPo Lu <luangruo@yahoo.com>
Thu, 3 Feb 2022 07:14:59 +0000 (07:14 +0000)
committerPo Lu <luangruo@yahoo.com>
Thu, 3 Feb 2022 07:16:10 +0000 (07:16 +0000)
* 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

index 1b2259bcc59a02328f8980f261c0448b4c13b266..ac0540b77f83122a743892dd63f7aac3bd5846ad 100644 (file)
@@ -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 ();
 }