diff options
author | ZenWalker <[email protected]> | 2017-08-04 00:26:09 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2017-08-04 00:30:53 +0200 |
commit | eb275151c64ee9c528e9f85f27e56e56e45af3ad (patch) | |
tree | 0a96daae56572a01687de04e07346afdb3fb194e /mate-panel/panel-multiscreen.c | |
parent | 7d98669e567f164efbfefc63ac2a94a78ac5798d (diff) | |
download | mate-panel-eb275151c64ee9c528e9f85f27e56e56e45af3ad.tar.bz2 mate-panel-eb275151c64ee9c528e9f85f27e56e56e45af3ad.tar.xz |
avoid deprecated gdk_screen_get_n_monitors
Diffstat (limited to 'mate-panel/panel-multiscreen.c')
-rw-r--r-- | mate-panel/panel-multiscreen.c | 8 |
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++) |