diff options
author | ZenWalker <[email protected]> | 2017-08-04 01:59:47 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2017-08-04 01:59:47 +0200 |
commit | c25745b93418252dbb96398f5eebdd875e6d3a88 (patch) | |
tree | 92fb06fd1d319cb337472b68a85a29ba44199ea3 /mate-screenshot/src | |
parent | 488a4acb01a190914cea0151dd43340c5716bd1b (diff) | |
download | mate-utils-c25745b93418252dbb96398f5eebdd875e6d3a88.tar.bz2 mate-utils-c25745b93418252dbb96398f5eebdd875e6d3a88.tar.xz |
avoid deprecated gdk_screen_get_n_monitors
Diffstat (limited to 'mate-screenshot/src')
-rw-r--r-- | mate-screenshot/src/screenshot-utils.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mate-screenshot/src/screenshot-utils.c b/mate-screenshot/src/screenshot-utils.c index 5876eeb3..093c1041 100644 --- a/mate-screenshot/src/screenshot-utils.c +++ b/mate-screenshot/src/screenshot-utils.c @@ -546,11 +546,19 @@ find_wm_window (Window xid) static cairo_region_t * make_region_with_monitors (GdkScreen *screen) { +#if GTK_CHECK_VERSION (3, 22, 0) + GdkDisplay *display; +#endif cairo_region_t *region; int num_monitors; 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 region = cairo_region_create (); |