all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: joakim@verona.se
To: Eli Zaretskii <eliz@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] xwidget updated (1d8b8a2 -> 5f46725)
Date: Fri, 16 Jan 2015 21:50:20 +0100	[thread overview]
Message-ID: <m3y4p2tppv.fsf@exodia.verona.se> (raw)
In-Reply-To: <83wq4v4rr9.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 09 Jan 2015 22:35:06 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: joakim@verona.se
>> Cc: monnier@iro.umontreal.ca,  emacs-devel@gnu.org
>> Date: Fri, 09 Jan 2015 21:12:39 +0100
>> 
>> Eli Zaretskii <eliz@gnu.org> 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)) ()
     (interactive)
     (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 purposes.\n")
     ,@body))

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

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	other threads:[~2015-01-16 20:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20141226164113.11620.38682@vcs.savannah.gnu.org>
2014-12-27 15:22 ` [Emacs-diffs] xwidget updated (1d8b8a2 -> 5f46725) Stefan Monnier
2014-12-27 15:48   ` joakim
2014-12-28 16:08     ` Eli Zaretskii
2014-12-29  9:48       ` joakim
2014-12-29 13:46         ` Ulrich Mueller
2014-12-29 16:10           ` Eli Zaretskii
2015-01-09 20:17           ` joakim
2014-12-29 16:03         ` Eli Zaretskii
2015-01-09 20:12           ` joakim
2015-01-09 20:35             ` Eli Zaretskii
2015-01-16 20:50               ` joakim [this message]
2015-01-16 20:59                 ` Eli Zaretskii
2015-01-16 21:16                   ` joakim
2015-01-17 10:19                     ` Eli Zaretskii
2015-01-17 15:21                       ` joakim
2015-01-17 17:40                         ` joakim
2015-01-17 18:04                           ` Eli Zaretskii
2015-01-17 18:13                             ` joakim
2015-01-17 18:39                             ` Eli Zaretskii
2015-01-17 23:08                               ` joakim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3y4p2tppv.fsf@exodia.verona.se \
    --to=joakim@verona.se \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.