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  
    127127   * Synchronize OpenGL and window resizing request streams.
    128128   */
    129129
    130   if (GTK_WIDGET_REALIZED (widget) && private->is_realized)
     130  if (gtk_widget_get_realized (widget) && private->is_realized)
    131131    {
    132132      gldrawable = gdk_window_get_gl_drawable (widget->window);
    133133      gdk_gl_drawable_wait_gdk (gldrawable);
     
    154154   * Remove OpenGL-capability from widget->window.
    155155   */
    156156
    157   if (GTK_WIDGET_REALIZED (widget))
     157  if (gtk_widget_get_realized (widget))
    158158    gdk_window_unset_gl_capability (widget->window);
    159159
    160160  private->is_realized = FALSE;
     
    174174   */
    175175
    176176  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))
    178178    {
    179179      GTK_GL_NOTE (MISC,
    180180        g_message (" - Install colormap to the top-level window."));
     
    194194   * Set a background of "None" on window to avoid AIX X server crash.
    195195   */
    196196
    197   if (GTK_WIDGET_REALIZED (widget))
     197  if (gtk_widget_get_realized (widget))
    198198    {
    199199      GTK_GL_NOTE (MISC,
    200200        g_message (" - window->bg_pixmap = %p",
     
    250250  GTK_GL_NOTE_FUNC ();
    251251
    252252  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);
    255255  g_return_val_if_fail (GDK_IS_GL_CONFIG (glconfig), FALSE);
    256256
    257257  /*
     
    432432  GTK_GL_NOTE_FUNC ();
    433433
    434434  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);
    436436
    437437  gldrawable = gdk_window_get_gl_drawable (widget->window);
    438438  if (gldrawable == NULL)
     
    474474  GLWidgetPrivate *private;
    475475
    476476  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);
    478478
    479479  private = g_object_get_qdata (G_OBJECT (widget), quark_gl_private);
    480480  if (private == NULL)
     
    501501gtk_widget_get_gl_window (GtkWidget *widget)
    502502{
    503503  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);
    505505
    506506  return gdk_window_get_gl_window (widget->window);
    507507}