diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
index 50369a8..a05e894 100644
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@ -378,15 +378,13 @@ get_screenshot_async (CcBackgroundPanel *panel)
   GVariant *method_params;
   GtkWidget *widget;
   ScreenshotData *data;
-  int primary;
 
   data = g_new0 (ScreenshotData, 1);
   data->panel = panel;
 
   widget = WID ("background-desktop-drawingarea");
-  primary = gdk_screen_get_primary_monitor (gtk_widget_get_screen (widget));
-  gdk_screen_get_monitor_geometry (gtk_widget_get_screen (widget), primary, &data->monitor_rect);
-  gdk_screen_get_monitor_workarea (gtk_widget_get_screen (widget), primary, &data->workarea_rect);
+  gdk_monitor_get_geometry (gdk_display_get_primary_monitor(gtk_widget_get_display (widget)), &data->monitor_rect);
+  gdk_monitor_get_workarea (gdk_display_get_primary_monitor(gtk_widget_get_display (widget)), &data->workarea_rect);
   if (calculate_contiguous_workarea (data)) {
     g_debug ("Capturing only a portion of the screen");
   } else {
