Should gtk_im_context_set_client_window be changed to set_client_widget?

To input Chinese, one key sequence could has multiple characters/words
candidates.  To deal with that, most Chinese input methods will popup
a candidate window so the user can see the instant feedback and make
his/her choices.

It is preferrable that the font used in the candidate window is the
same as/consistent with the font used by the client window.  Unfortunately
there is no way to do that cleanly in the current IM context interface.
One possible solution is to change
    void gtk_im_context_set_client_window(GtkIMContext *context,
                                          GdkWindow *window);
    void gtk_im_context_set_client_widget(GtkIMContext *context,
                                          GtkWidget *widget);
Now the IM module knows about the widget and through the widget, it can
retrieve pango context (gtk_widget_get_pango_context()) so the font, etc. 


Yao Zhang

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