Re: Missing GdkWindow from top level GtkWindow



From: "Gus Koppel" <gtk spamkiller bytechase cx>
However, the question remains: when / where are GdkWindows of top level
GtkWindows? I receive NULL pointers any time I try to obtain them via
gtk_widget_get_parent_window (). Are top level GtkWindows not supposed
to be associated with GdkWindows?

They are here: 

GtkWidget *widget = gtk_*_new();
GdkWindow wnd = widget->window; 

First one should rather check with a macro GTK_WIDGET_NO_WINDOW()
if the widget _has_ an own window.

AFAIK, toplevel windows have no *parent* window, because
they're children of *no* other window. That's why 
gtk_widget_get_parent_window () returns NULL.

Best regards,
Waldek Maleska






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