From f743caf3054bbbadc6b98c9e746fd8ae5114b142 Mon Sep 17 00:00:00 2001 From: infirit Date: Fri, 16 May 2014 16:57:05 +0200 Subject: Use gdk_window_get_width also for gtk2 It was introduced in gtk+-2.24 --- applets/notification_area/fixedtip.c | 4 ---- libmate-panel-applet/mate-panel-applet.c | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/applets/notification_area/fixedtip.c b/applets/notification_area/fixedtip.c index 7bd61409..ded3dbb6 100644 --- a/applets/notification_area/fixedtip.c +++ b/applets/notification_area/fixedtip.c @@ -179,12 +179,8 @@ na_fixed_tip_position (NaFixedTip *fixedtip) #endif gdk_window_get_origin (parent_window, &root_x, &root_y); -#if GTK_CHECK_VERSION(3, 0, 0) parent_width = gdk_window_get_width(parent_window); parent_height = gdk_window_get_height(parent_window); -#else - gdk_drawable_get_size(GDK_DRAWABLE(parent_window), &parent_width, &parent_height); -#endif screen_width = gdk_screen_get_width (screen); screen_height = gdk_screen_get_height (screen); diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c index efcca300..7a514c58 100644 --- a/libmate-panel-applet/mate-panel-applet.c +++ b/libmate-panel-applet/mate-panel-applet.c @@ -1461,12 +1461,10 @@ mate_panel_applet_get_pixmap (MatePanelApplet *applet, } #endif -#if GTK_CHECK_VERSION(3, 0, 0) width = gdk_window_get_width(window); height = gdk_window_get_height(window); +#if GTK_CHECK_VERSION(3, 0, 0) surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height); -#else - gdk_drawable_get_size(GDK_DRAWABLE(window), &width, &height); #endif #if GTK_CHECK_VERSION (3, 0, 0) -- cgit v1.2.1