diff --git a/modules/engines/ms-windows/msw_style.c b/modules/engines/ms-windows/msw_style.c index 6f1525920..33eed35d0 100755 --- a/modules/engines/ms-windows/msw_style.c +++ b/modules/engines/ms-windows/msw_style.c @@ -878,6 +878,22 @@ setup_system_styles (GtkStyle *style) } } +/* the size of a window or pixmap, without the deprecated + * gdk_drawable_get_size() this engine is built without */ +static void +drawable_get_size (GdkDrawable *drawable, gint *width, gint *height) +{ + if (GDK_IS_WINDOW (drawable)) + { + if (width) + *width = gdk_window_get_width (GDK_WINDOW (drawable)); + if (height) + *height = gdk_window_get_height (GDK_WINDOW (drawable)); + } + else + gdk_pixmap_get_size (GDK_PIXMAP (drawable), width, height); +} + static gboolean sanitize_size (GdkWindow *window, gint *width, gint *height) { @@ -886,15 +902,15 @@ sanitize_size (GdkWindow *window, gint *width, gint *height) if ((*width == -1) && (*height == -1)) { set_bg = GDK_IS_WINDOW (window); - gdk_drawable_get_size (window, width, height); + drawable_get_size (window, width, height); } else if (*width == -1) { - gdk_drawable_get_size (window, width, NULL); + drawable_get_size (window, width, NULL); } else if (*height == -1) { - gdk_drawable_get_size (window, NULL, height); + drawable_get_size (window, NULL, height); } return set_bg;