diff options
Diffstat (limited to 'libmate-desktop/mate-bg.c')
-rw-r--r-- | libmate-desktop/mate-bg.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c index 9e67e0e..d4a9a71 100644 --- a/libmate-desktop/mate-bg.c +++ b/libmate-desktop/mate-bg.c @@ -1471,8 +1471,8 @@ mate_bg_get_surface_from_root (GdkScreen *screen) gdk_error_trap_pop_ignored (); } - gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, - &width, &height); + width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)); + height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)); if (source_pixmap) { surface = cairo_surface_create_similar (source_pixmap, @@ -2117,14 +2117,10 @@ scale_thumbnail (MateBGPlacement placement, if (get_thumb_annotations (thumb, &o_width, &o_height) || (filename && get_original_size (filename, &o_width, &o_height))) { - int scr_height; - int scr_width; + int scr_height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)); + int scr_width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)); int thumb_width = gdk_pixbuf_get_width (thumb); int thumb_height = gdk_pixbuf_get_height (thumb); - - gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, - &scr_width, &scr_height); - double screen_to_dest = fit_factor (scr_width, scr_height, dest_width, dest_height); double thumb_to_orig = fit_factor (thumb_width, thumb_height, |