Re: Should gtk_im_context_set_client_window be changed to set_client_widget?



> From gtk-i18n-list-admin gnome org Sun Apr 21 15:55:15 2002
> 
> It would be good to open a report on bugzilla.gnome.org about this.
 
Done (Bug 79453).

> As a workaround, if you call gdk_window_get_user_data() on the
> GdkWindow, the user data contains the GtkWidget owning that window.

Thanks.  I was thinking along the line too.  Then I read in
gtk+/gdk/gdkwindow.c:

 * For most purposes this function is deprecated in favor of
 * g_object_set_data(). However, for historical reasons GTK+ stores
 * the #GtkWidget that owns a #GdkWindow as user data on the
 * #GdkWindow. So, custom widget implementations should use
 * this function for that. If GTK+ receives an event for a #GdkWindow,
 * and the user data for the window is non-%NULL, GTK+ will assume the
 * user data is a #GtkWidget, and forward the event to that widget.

This makes me wondering: Is the feature just 'historical'?  Will it
be true in the future?  But it should be ok for now.

Regards,

Yao Zhang



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