GTK Selection owner question.


As far as I understand a GtkInvisible widget can be used as the "selection owner". If this is correct then there is a minor problem. You can't set a GtkInvisible widget as the selection owner unless the GTK_VISIBLE flag is set. This is because of the following line near the top of the gtk_selection_owner_set function:

g_return_val_if_fail (widget == NULL || GTK_WIDGET_REALIZED (widget), FALSE);

So, to be able to set a GtkInvisible widget as the "selection owner" you have to either call gtk_widget_show() or specifically set the GTK_VISIBLE flag and call gtk_widget_realize().

It seems a bit strange calling gtk_widget_show() or setting the GTK_VISIBLE flag on a widget that is supposed to be invisible.

Is this correct or have I missed something,


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