1 diff -Nur gtkglext-1.2.0.orig/gtk/gtkglwidget.c gtkglext-1.2.0/gtk/gtkglwidget.c
2 --- gtkglext-1.2.0.orig/gtk/gtkglwidget.c 2004-02-20 11:38:36.000000000 +0200
3 +++ gtkglext-1.2.0/gtk/gtkglwidget.c 2010-04-20 19:29:42.941917275 +0300
5 * Synchronize OpenGL and window resizing request streams.
8 - if (GTK_WIDGET_REALIZED (widget) && private->is_realized)
9 + if (gtk_widget_get_realized (widget) && private->is_realized)
11 gldrawable = gdk_window_get_gl_drawable (widget->window);
12 gdk_gl_drawable_wait_gdk (gldrawable);
14 * Remove OpenGL-capability from widget->window.
17 - if (GTK_WIDGET_REALIZED (widget))
18 + if (gtk_widget_get_realized (widget))
19 gdk_window_unset_gl_capability (widget->window);
21 private->is_realized = FALSE;
25 toplevel = gtk_widget_get_toplevel (widget);
26 - if (GTK_WIDGET_TOPLEVEL (toplevel) && !GTK_WIDGET_REALIZED (toplevel))
27 + if (gtk_widget_is_toplevel (toplevel) && !gtk_widget_get_realized (toplevel))
30 g_message (" - Install colormap to the top-level window."));
32 * Set a background of "None" on window to avoid AIX X server crash.
35 - if (GTK_WIDGET_REALIZED (widget))
36 + if (gtk_widget_get_realized (widget))
39 g_message (" - window->bg_pixmap = %p",
43 g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
44 - g_return_val_if_fail (!GTK_WIDGET_NO_WINDOW (widget), FALSE);
45 - g_return_val_if_fail (!GTK_WIDGET_REALIZED (widget), FALSE);
46 + g_return_val_if_fail (gtk_widget_get_has_window (widget), FALSE);
47 + g_return_val_if_fail (!gtk_widget_get_realized (widget), FALSE);
48 g_return_val_if_fail (GDK_IS_GL_CONFIG (glconfig), FALSE);
54 g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
55 - g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), NULL);
56 + g_return_val_if_fail (gtk_widget_get_realized (widget), NULL);
58 gldrawable = gdk_window_get_gl_drawable (widget->window);
59 if (gldrawable == NULL)
61 GLWidgetPrivate *private;
63 g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
64 - g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), NULL);
65 + g_return_val_if_fail (gtk_widget_get_realized (widget), NULL);
67 private = g_object_get_qdata (G_OBJECT (widget), quark_gl_private);
70 gtk_widget_get_gl_window (GtkWidget *widget)
72 g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
73 - g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), NULL);
74 + g_return_val_if_fail (gtk_widget_get_realized (widget), NULL);
76 return gdk_window_get_gl_window (widget->window);