diff options
Diffstat (limited to 'libmate-desktop/mate-bg.c')
-rw-r--r-- | libmate-desktop/mate-bg.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c index fa38a99..9e67e0e 100644 --- a/libmate-desktop/mate-bg.c +++ b/libmate-desktop/mate-bg.c @@ -858,7 +858,11 @@ draw_color_each_monitor (MateBG *bg, num_monitors = gdk_screen_get_n_monitors (screen); #endif for (monitor = 0; monitor < num_monitors; monitor++) { +#if GTK_CHECK_VERSION (3, 22, 0) + gdk_monitor_get_geometry (gdk_display_get_monitor (display, monitor), &rect); +#else gdk_screen_get_monitor_geometry (screen, monitor, &rect); +#endif draw_color_area (bg, dest, &rect); } } @@ -1043,7 +1047,11 @@ draw_each_monitor (MateBG *bg, GdkRectangle rect; GdkPixbuf *pixbuf; +#if GTK_CHECK_VERSION (3, 22, 0) + gdk_monitor_get_geometry (gdk_display_get_monitor (display, monitor), &rect); +#else gdk_screen_get_monitor_geometry (screen, monitor, &rect); +#endif pixbuf = get_pixbuf_for_size (bg, monitor, rect.width, rect.height); if (pixbuf) { |