[PATCH 0/5] Improve text protocol
Daniel Stone
daniel at fooishbar.org
Fri May 3 04:05:25 PDT 2013
Hi,
On 2 May 2013 20:56, Kristian Høgsberg <hoegsberg at gmail.com> wrote:
> On Tue, Apr 16, 2013 at 06:19:47PM -0700, Bill Spitzak wrote:
>> I would remember the positions of styling as bytes. However the
>> renderer can render as though they are moved left to the first break
>> between glyphs (ie it will preedit-highlight the character the first
>> byte is in, and if the preedit region ends in the middle of a glyph
>> then that glyph will not be preedited). Again this problem needs to
>> be solved for combining characters anyway so this is not any more
>> difficult.
>>
>> In all cases the client can potentially detect that the input method
>> is screwing up, and perhaps report this as a warning message.
>
> I think consensus is that we leave the offsets as bytes. I agree with
> that, considering that: 1) it shouldn't happen, 2) when it does, the
> toolkit will have deal with it.
The other unintended consequence of character positions rather than
bytes is that you end up with the D-Bus approach of spending half your
life just validating that the strings you're passing around are valid
UTF-8. No point doing that in the compositor really.
Cheers,
Daniel
More information about the wayland-devel
mailing list