[PATCH weston v4] Implement text cursor position protocol.
Scott Moreau
oreaus at gmail.com
Thu May 31 10:16:42 PDT 2012
On Thu, May 31, 2012 at 11:10 AM, Kristian Høgsberg <hoegsberg at gmail.com>wrote:
> On Sun, May 27, 2012 at 02:25:02PM -0600, Scott Moreau wrote:
> > Here we create a new client/compositor interface in weston to allow
> > clients to report their x/y cursor position to the compositor. These
> > values are then used to center the zoom area on this point. This
> > is useful for everyone, especially people who are visually impaired.
> > ---
> >
> > Made changes discussed for v3 patch.
>
> Committed as is, but just a brief comment below.
>
> Kristian
>
Thanks!
>
> @@ -72,6 +73,7 @@ struct display {
> struct wl_shell *shell;
> struct wl_shm *shm;
> struct wl_data_device_manager *data_device_manager;
> + struct text_cursor_position *text_cursor_position;
> EGLDisplay dpy;
> EGLConfig argb_config;
> EGLContext argb_ctx;
> @@ -149,6 +151,7 @@ struct window {
> int resize_needed;
> int type;
> int transparent;
> + int send_cursor_position;
> struct input *keyboard_device;
> enum window_buffer_type buffer_type;
>
> @@ -1822,6 +1825,9 @@ keyboard_handle_key(void *data, struct wl_keyboard
*keyboard,
> if (!window || window->keyboard_device != input)
> return;
>
> + if (state)
> + window->send_cursor_position = 1;
> +
I don't think we should track this in window.c. If a client wants to
> set the text cursor position, we shouldn't second guess it. Maybe the
> cursor is moving because text got pasted into the window or such.
>
Ok, I'm a little confused about this then. Here,
http://lists.freedesktop.org/archives/wayland-devel/2012-May/003597.htmlyou
made this comment:
"Shouldn't we only update position when the user actually presses a key?
What if you're dumping a lot of data to the terminal?"
This is the only reason I even installed this additional code.
Thanks,
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20120531/b93cc8a9/attachment-0001.htm>
More information about the wayland-devel
mailing list