diff options
author | Stefano Karapetsas <[email protected]> | 2014-04-26 17:09:18 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-04-26 17:09:18 +0200 |
commit | b4ff6c7fafc624f1db379675f36889ac70edef8e (patch) | |
tree | ac75013f77e5af5abd3ee211a519b0423b5ddfe4 /libslab/app-resizer.c | |
parent | fa57a223d377109563f067c708847c26428a7aae (diff) | |
download | mate-control-center-b4ff6c7fafc624f1db379675f36889ac70edef8e.tar.bz2 mate-control-center-b4ff6c7fafc624f1db379675f36889ac70edef8e.tar.xz |
libslab: GTK3 fixes
Diffstat (limited to 'libslab/app-resizer.c')
-rw-r--r-- | libslab/app-resizer.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/libslab/app-resizer.c b/libslab/app-resizer.c index 5cdc247e..f1e34629 100644 --- a/libslab/app-resizer.c +++ b/libslab/app-resizer.c @@ -340,16 +340,17 @@ app_resizer_paint_window (GtkWidget * widget, GdkEventExpose * event, AppShellDa */ #if GTK_CHECK_VERSION (3, 0, 0) - GdkRectangle rect; - gdk_cairo_get_clip_rectangle (cr, &rect); + cairo_save(cr); + + GtkAllocation widget_allocation; + gtk_widget_get_allocation (widget, &widget_allocation); gdk_cairo_set_source_color (cr, gtk_widget_get_style (widget)->base); cairo_set_line_width(cr, 1); - cairo_rectangle(cr, 0, 0, rect.width, rect.height); + cairo_rectangle(cr, widget_allocation.x, widget_allocation.y, widget_allocation.width, widget_allocation.height); cairo_stroke_preserve(cr); cairo_fill(cr); - #else gdk_draw_rectangle (GTK_LAYOUT (widget)->bin_window, widget->style->base_gc[GTK_STATE_NORMAL], TRUE, event->area.x, event->area.y, @@ -360,16 +361,14 @@ app_resizer_paint_window (GtkWidget * widget, GdkEventExpose * event, AppShellDa { GtkWidget *selected_widget = GTK_WIDGET (app_data->selected_group); #if GTK_CHECK_VERSION (3, 0, 0) - GtkAllocation widget_allocation; GtkAllocation selected_widget_allocation; - gtk_widget_get_allocation (widget, &widget_allocation); gtk_widget_get_allocation (selected_widget, &selected_widget_allocation); gdk_cairo_set_source_color (cr, gtk_widget_get_style (selected_widget)->light); cairo_set_line_width(cr, 1); - cairo_rectangle(cr, selected_widget_allocation.x, selected_widget_allocation.y, widget_allocation.width, selected_widget_allocation.height); + cairo_rectangle(cr, selected_widget_allocation.x, selected_widget_allocation.y, selected_widget_allocation.width, selected_widget_allocation.height); cairo_stroke_preserve(cr); cairo_fill(cr); #else @@ -381,5 +380,9 @@ app_resizer_paint_window (GtkWidget * widget, GdkEventExpose * event, AppShellDa #endif } +#if GTK_CHECK_VERSION (3, 0, 0) + cairo_restore(cr); +#endif + return FALSE; } |