diff options
author | Stefano Karapetsas <[email protected]> | 2014-04-23 18:47:49 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-04-23 18:47:49 +0200 |
commit | fd2e0db8c8315fd8cecd45a422e9a8f161589841 (patch) | |
tree | 5b6d3f63b53ce91113269bb73da5861a05568d78 /src/ui/theme.c | |
parent | d07a3960e9b81aaf9864902e5398eadf801a531b (diff) | |
download | marco-fd2e0db8c8315fd8cecd45a422e9a8f161589841.tar.bz2 marco-fd2e0db8c8315fd8cecd45a422e9a8f161589841.tar.xz |
GTK3 fixes
Diffstat (limited to 'src/ui/theme.c')
-rw-r--r-- | src/ui/theme.c | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c index 4d430b7c..be948369 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -3425,7 +3425,11 @@ state_flags_from_gtk_state (GtkStateType state) */ static void meta_draw_op_draw_with_env (const MetaDrawOp *op, + #if GTK_CHECK_VERSION(3, 0, 0) + GtkStyleContext *style_gtk, + #else GtkStyle *style_gtk, + #endif GtkWidget *widget, #if GTK_CHECK_VERSION(3, 0, 0) cairo_t *cr, @@ -3990,7 +3994,12 @@ meta_draw_op_draw_with_env (const MetaDrawOp *op, break; } +#if GTK_CHECK_VERSION (3, 0, 0) + cairo_restore (cr); + gtk_style_context_restore (style_gtk); +#else cairo_destroy (cr); +#endif } void @@ -4532,7 +4541,11 @@ button_rect (MetaButtonType type, void meta_frame_style_draw_with_style (MetaFrameStyle *style, + #if GTK_CHECK_VERSION(3, 0, 0) + GtkStyleContext *style_gtk, + #else GtkStyle *style_gtk, + #endif GtkWidget *widget, #if GTK_CHECK_VERSION(3, 0, 0) cairo_t *cr, @@ -4908,7 +4921,13 @@ meta_frame_style_draw (MetaFrameStyle *style, GdkPixbuf *mini_icon, GdkPixbuf *icon) { - meta_frame_style_draw_with_style (style, gtk_widget_get_style (widget), widget, + meta_frame_style_draw_with_style (style, + #if GTK_CHECK_VERSION(3, 0, 0) + gtk_widget_get_style_context (widget), + #else + gtk_widget_get_style (widget), + #endif + widget, #if GTK_CHECK_VERSION(3, 0, 0) cr, #else @@ -5467,7 +5486,11 @@ meta_theme_get_title_scale (MetaTheme *theme, void meta_theme_draw_frame_with_style (MetaTheme *theme, + #if GTK_CHECK_VERSION(3, 0, 0) + GtkStyleContext *style_gtk, + #else GtkStyle *style_gtk, + #endif GtkWidget *widget, #if GTK_CHECK_VERSION(3, 0, 0) cairo_t *cr, @@ -5545,7 +5568,13 @@ meta_theme_draw_frame (MetaTheme *theme, GdkPixbuf *mini_icon, GdkPixbuf *icon) { - meta_theme_draw_frame_with_style (theme, gtk_widget_get_style (widget), widget, + meta_theme_draw_frame_with_style (theme, + #if GTK_CHECK_VERSION(3, 0, 0) + gtk_widget_get_style_context (widget), + #else + gtk_widget_get_style (widget), + #endif + widget, #if GTK_CHECK_VERSION(3, 0, 0) cr, #else |