emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] xwidget d1ca98e: Fill in some bidi values for xwidgets


From: Joakim Verona
Subject: [Emacs-diffs] xwidget d1ca98e: Fill in some bidi values for xwidgets
Date: Fri, 16 Jan 2015 20:39:31 +0000

branch: xwidget
commit d1ca98e3413ee8bbe94d03907a375b57f87e5329
Author: Joakim Verona <address@hidden>
Commit: Joakim Verona <address@hidden>

    Fill in some bidi values for xwidgets
    
    Addes some bidi code for xwidget, but not complete yet
---
 src/xdisp.c |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 120e810..a375757 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -25863,17 +25863,33 @@ produce_xwidget_glyph (struct it *it)
          glyph->descent = it->descent;
          glyph->voffset = it->voffset;
          glyph->type = XWIDGET_GLYPH;
-
+         glyph->avoid_cursor_p = it->avoid_cursor_p;
          glyph->multibyte_p = it->multibyte_p;
-         glyph->left_box_line_p = it->start_of_box_run_p;
-         glyph->right_box_line_p = it->end_of_box_run_p;
-         glyph->overlaps_vertically_p = 0;
+         if (it->glyph_row->reversed_p && area == TEXT_AREA)
+           {
+             /* In R2L rows, the left and the right box edges need to be
+                drawn in reverse direction.  */
+             glyph->right_box_line_p = it->start_of_box_run_p;
+             glyph->left_box_line_p = it->end_of_box_run_p;
+           }
+         else
+           {
+             glyph->left_box_line_p = it->start_of_box_run_p;
+             glyph->right_box_line_p = it->end_of_box_run_p;
+           }
+          glyph->overlaps_vertically_p = 0;
           glyph->padding_p = 0;
          glyph->glyph_not_available_p = 0;
          glyph->face_id = it->face_id;
           glyph->u.xwidget = it->xwidget;
           
//assert_valid_xwidget_id(glyph->u.xwidget_id,"produce_xwidget_glyph");
          glyph->font_type = FONT_TYPE_UNKNOWN;
+         if (it->bidi_p)
+           {
+             glyph->resolved_level = it->bidi_it.resolved_level;
+             eassert ((it->bidi_it.type & 7) == it->bidi_it.type);
+             glyph->bidi_type = it->bidi_it.type;
+           }
          ++it->glyph_row->used[area];
        }
       else



reply via email to

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