summaryrefslogtreecommitdiff
path: root/mate-panel/panel-multiscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'mate-panel/panel-multiscreen.c')
-rw-r--r--mate-panel/panel-multiscreen.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mate-panel/panel-multiscreen.c b/mate-panel/panel-multiscreen.c
index afe8c24e..49738270 100644
--- a/mate-panel/panel-multiscreen.c
+++ b/mate-panel/panel-multiscreen.c
@@ -202,11 +202,19 @@ panel_multiscreen_get_gdk_monitors_for_screen (GdkScreen *screen,
int *monitors_ret,
GdkRectangle **geometries_ret)
{
+#if GTK_CHECK_VERSION (3, 22, 0)
+ GdkDisplay *display;
+#endif
int num_monitors;
GdkRectangle *geometries;
int i;
+#if GTK_CHECK_VERSION (3, 22, 0)
+ display = gdk_screen_get_display (screen);
+ num_monitors = gdk_display_get_n_monitors (display);
+#else
num_monitors = gdk_screen_get_n_monitors (screen);
+#endif
geometries = g_new (GdkRectangle, num_monitors);
for (i = 0; i < num_monitors; i++)