Question about gtk_im_context_set_cursor_location()



I am trying to use the cursor location as a reference to position
candidates popup window.  The problem is where is the origin of the
cursor location?

It seems that the cursor location is relative to the client window.
But if the client is GtkTextView and has been scrolled down, the cursor
location is no longer right, or I can not do
    gdk_window_get_origin(client_window, &x, &y);
    cursor_x_in_screen = x + area->x;
    cursor_y_in_screen = y + area->y;
to obtain cursor location in screen coordinates.  Since within IM,
I don't/shouldn't know whether the client has scrolled down or not,
it is very hard for me to position the candidates window at the right
spot.

I think we can simply change gtk_im_context_set_cursor_location()
to pass absolute cursor location in screen coordinates.  Should I
open another report on bugzilla?

Regards,

Yao Zhang



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