GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 6a28e7b1 authored by Javier Jardón's avatar Javier Jardón

demos/gtk-demo/colorsel.c: Use accessor functions to access GtkWidget

parent 876c0b29
......@@ -19,14 +19,17 @@ expose_event_callback (GtkWidget *widget,
GdkEventExpose *event,
gpointer data)
if (widget->window)
GdkWindow *window;
window = gtk_widget_get_window (widget);
if (window)
GtkStyle *style;
cairo_t *cr;
style = gtk_widget_get_style (widget);
cr = gdk_cairo_create (widget->window);
cr = gdk_cairo_create (window);
gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
gdk_cairo_rectangle (cr, &event->area);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment