From ab8e72a4e6fe7cb8ee2dddb0d43d749078fd999c Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Wed, 23 Apr 2014 19:06:44 +0200 Subject: GTK3 fixes --- src/ui/frames.c | 4 ++++ src/ui/theme.c | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'src/ui') diff --git a/src/ui/frames.c b/src/ui/frames.c index 9d4fd68d..c6f7f94e 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -736,7 +736,11 @@ meta_frames_unmanage_window (MetaFrames *frames, g_hash_table_remove (frames->frames, &frame->xwindow); +#if GTK_CHECK_VERSION (3, 0, 0) + g_object_unref (frame->style); +#else gtk_style_detach (frame->style); +#endif gdk_window_destroy (frame->window); diff --git a/src/ui/theme.c b/src/ui/theme.c index be948369..2ddb1485 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -410,10 +410,14 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout, { int buttons_height, title_height; +#if GTK_CHECK_VERSION(3, 0, 0) + g_return_if_fail (layout != NULL); +#else g_return_if_fail (top_height != NULL); g_return_if_fail (bottom_height != NULL); g_return_if_fail (left_width != NULL); g_return_if_fail (right_width != NULL); +#endif if (!layout->has_title) text_height = 0; -- cgit v1.2.1