[Top][All Lists]

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

Re: [Emacs-diffs] xwidget updated (1d8b8a2 -> 5f46725)

From: joakim
Subject: Re: [Emacs-diffs] xwidget updated (1d8b8a2 -> 5f46725)
Date: Fri, 16 Jan 2015 21:50:20 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: address@hidden
>> Cc: address@hidden,  address@hidden
>> Date: Fri, 09 Jan 2015 21:12:39 +0100
>> Eli Zaretskii <address@hidden> writes:
>> >
>> >> > 5) xdisp.c:produce_xwidget_glyph needs to account for bidirectional
>> >> >    display in the same way produce_image_glyph does: swao the left and
>> >> >    right box edges, and populate the bidi members of struct glyph.
>> >
>> >> I havent thought about bidi at all.
>> >
>> > Just look at what produce_image_glyph does, it should tell you enough.
>> >
>> >> Do you have a simple test case [for bidi]?
>> >
>> > Type a few Arabic or Hebrew characters, then insert a widget, then
>> > type some more Arabic or Hebrew.  Try this both in a buffer that has
>> > bidi-paragraph-direction set to nil and in a buffer that has it set to
>> > left-to-right or right-to-left.
>> I tried this briefly by opening the hello file and pasting an arabic
>> hello string a couple of times.
>> Stuff happens, but maybe not the correct stuff. It is hard for me to tell.
> Describe the "stuff that happens", or show a snapshot, and perhaps I
> will be able to tell if its correct.

Ok, so I added some test code that looks like:

(defmacro xwidget-demo (name &rest body)
  `(defun ,(intern (concat "xwidget-demo-" name)) ()
     (switch-to-buffer ,(format "*xwidget-demo-%s*" name))
     (text-mode);;otherwise no local keymap
     (insert "Some random text for xwidgets to be inserted in for demo 

(xwidget-demo "a-button-bidi"
              (xwidget-insert (point-min) 'Button  "button" 60  50)
              (set (make-local-variable 'bidi-paragraph-direction) 
              (define-key (current-local-map) [xwidget-event] 

and I get a buffer with some text that behaves in R2L mode, and a gtk
button embedded in the text.

The button doesnt seem to move with the text as it should, it stays
glued to the right window edge for some reason.

I tried adding some missing bidi code in produce_xwidget_glyph() but the
result is the same, so I'm obviously missing something. Any ideas?

Joakim Verona

reply via email to

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