diff options
author | Benjamin Otte <otte@redhat.com> | 2016-10-06 23:55:53 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-10-16 18:17:21 +0200 |
commit | eace2cf4219bbb1be376567f804ae2e0c3b5821a (patch) | |
tree | 1e74bd8c75c7105e217e0d639c5dc6e0742536c4 /gtk/gtkdrawingarea.c | |
parent | bae12e6a2fdb1ed58f159f0a9606364480efea99 (diff) | |
download | gtk+-eace2cf4219bbb1be376567f804ae2e0c3b5821a.tar.gz |
API: Remove gdk_window_set_background()
Backgrounds are always transparent black.
Diffstat (limited to 'gtk/gtkdrawingarea.c')
-rw-r--r-- | gtk/gtkdrawingarea.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/gtk/gtkdrawingarea.c b/gtk/gtkdrawingarea.c index 16f8f3befd..f39600171b 100644 --- a/gtk/gtkdrawingarea.c +++ b/gtk/gtkdrawingarea.c @@ -120,7 +120,6 @@ */ static void gtk_drawing_area_realize (GtkWidget *widget); -static void gtk_drawing_area_style_updated (GtkWidget *widget); static void gtk_drawing_area_size_allocate (GtkWidget *widget, GtkAllocation *allocation); static void gtk_drawing_area_send_configure (GtkDrawingArea *darea); @@ -134,7 +133,6 @@ gtk_drawing_area_class_init (GtkDrawingAreaClass *class) widget_class->realize = gtk_drawing_area_realize; widget_class->size_allocate = gtk_drawing_area_size_allocate; - widget_class->style_updated = gtk_drawing_area_style_updated; gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_DRAWING_AREA); } @@ -158,33 +156,6 @@ gtk_drawing_area_new (void) } static void -set_background (GtkWidget *widget) -{ - if (gtk_widget_get_realized (widget) && - gtk_widget_get_has_window (widget)) - { - /* We still need to call gtk_style_context_set_background() here for - * GtkDrawingArea, since clients expect backgrounds set on it (e.g. through - * gtk_widget_override_background_color) to be available even when they - * don't chain up from draw(). - * This should be revisited next time we have a major API break. - */ - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - gtk_style_context_set_background (gtk_widget_get_style_context (widget), - gtk_widget_get_window (widget)); - G_GNUC_END_IGNORE_DEPRECATIONS; - } -} - -static void -gtk_drawing_area_style_updated (GtkWidget *widget) -{ - GTK_WIDGET_CLASS (gtk_drawing_area_parent_class)->style_updated (widget); - - set_background (widget); -} - -static void gtk_drawing_area_realize (GtkWidget *widget) { GtkAllocation allocation; @@ -216,8 +187,6 @@ gtk_drawing_area_realize (GtkWidget *widget) &attributes, attributes_mask); gtk_widget_register_window (widget, window); gtk_widget_set_window (widget, window); - - set_background (widget); } gtk_drawing_area_send_configure (GTK_DRAWING_AREA (widget)); |