Ticket #25782: patch-gtk-gtkglwidget.c.diff
File patch-gtk-gtkglwidget.c.diff, 2.6 KB (added by irving.phillips@…, 14 years ago) |
---|
-
gtk/gtkglwidget.c
old new 127 127 * Synchronize OpenGL and window resizing request streams. 128 128 */ 129 129 130 if ( GTK_WIDGET_REALIZED(widget) && private->is_realized)130 if (gtk_widget_get_realized (widget) && private->is_realized) 131 131 { 132 132 gldrawable = gdk_window_get_gl_drawable (widget->window); 133 133 gdk_gl_drawable_wait_gdk (gldrawable); … … 154 154 * Remove OpenGL-capability from widget->window. 155 155 */ 156 156 157 if ( GTK_WIDGET_REALIZED(widget))157 if (gtk_widget_get_realized (widget)) 158 158 gdk_window_unset_gl_capability (widget->window); 159 159 160 160 private->is_realized = FALSE; … … 174 174 */ 175 175 176 176 toplevel = gtk_widget_get_toplevel (widget); 177 if ( GTK_WIDGET_TOPLEVEL (toplevel) && !GTK_WIDGET_REALIZED(toplevel))177 if (gtk_widget_is_toplevel (toplevel) && !gtk_widget_get_realized (toplevel)) 178 178 { 179 179 GTK_GL_NOTE (MISC, 180 180 g_message (" - Install colormap to the top-level window.")); … … 194 194 * Set a background of "None" on window to avoid AIX X server crash. 195 195 */ 196 196 197 if ( GTK_WIDGET_REALIZED(widget))197 if (gtk_widget_get_realized (widget)) 198 198 { 199 199 GTK_GL_NOTE (MISC, 200 200 g_message (" - window->bg_pixmap = %p", … … 250 250 GTK_GL_NOTE_FUNC (); 251 251 252 252 g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); 253 g_return_val_if_fail ( !GTK_WIDGET_NO_WINDOW(widget), FALSE);254 g_return_val_if_fail (! GTK_WIDGET_REALIZED(widget), FALSE);253 g_return_val_if_fail (gtk_widget_get_has_window (widget), FALSE); 254 g_return_val_if_fail (!gtk_widget_get_realized (widget), FALSE); 255 255 g_return_val_if_fail (GDK_IS_GL_CONFIG (glconfig), FALSE); 256 256 257 257 /* … … 432 432 GTK_GL_NOTE_FUNC (); 433 433 434 434 g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); 435 g_return_val_if_fail ( GTK_WIDGET_REALIZED(widget), NULL);435 g_return_val_if_fail (gtk_widget_get_realized (widget), NULL); 436 436 437 437 gldrawable = gdk_window_get_gl_drawable (widget->window); 438 438 if (gldrawable == NULL) … … 474 474 GLWidgetPrivate *private; 475 475 476 476 g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); 477 g_return_val_if_fail ( GTK_WIDGET_REALIZED(widget), NULL);477 g_return_val_if_fail (gtk_widget_get_realized (widget), NULL); 478 478 479 479 private = g_object_get_qdata (G_OBJECT (widget), quark_gl_private); 480 480 if (private == NULL) … … 501 501 gtk_widget_get_gl_window (GtkWidget *widget) 502 502 { 503 503 g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); 504 g_return_val_if_fail ( GTK_WIDGET_REALIZED(widget), NULL);504 g_return_val_if_fail (gtk_widget_get_realized (widget), NULL); 505 505 506 506 return gdk_window_get_gl_window (widget->window); 507 507 }