GTK_VISIBLE flag



Hi Owen!

I've a little question about the GTK_VISIBLE flag and the gtk_widget_real_map
function.

Currently it's possible to call something like :

gtk_widget_hide (widget);
gtk_widget_realize (widget);
gtk_widget_map (widget);

This code will bring any widget onto the screen, but its GTK_VISIBLE flag
will be FALSE. I think gtk_widget_real_map should set GTK_VISIBLE. Or, if you
don't like that, it should at least abort the map operation.
I recognized the problem in GtkNotebook. Inactive pages are simply unmapped
and will be mapped as soon as you switch to the page. If you call
gtk_widget_hide for a page, it will be mapped anyway, but it's visibility
state is FALSE.
GtkNotebook is buggy in this case - no doubt. But I think we'll avoid such
trouble, if we handle the GTK_VISIBLE flag in gtk_widget_real_map correct.

bye,
  Lars



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