summaryrefslogtreecommitdiff
path: root/src/procman.cpp
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2017-12-13 21:22:15 +0100
committerPablo Barciela <[email protected]>2017-12-13 21:24:23 +0100
commit03bc1b823b3eb7af4f51e8a8c484576552ce4c6a (patch)
tree523b569beb67a308642a730c43d53ab13be02af4 /src/procman.cpp
parentcd5b3a039d5e7b0d1ca43f7dc703d2d38ab1d477 (diff)
downloadmate-system-monitor-03bc1b823b3eb7af4f51e8a8c484576552ce4c6a.tar.bz2
mate-system-monitor-03bc1b823b3eb7af4f51e8a8c484576552ce4c6a.tar.xz
WidthOfScreen and HeightOfScreen implementation
This commit reverts: https://github.com/mate-desktop/mate-system-monitor/commit/6d94559673232a1dc01d16eacbe2028aae175d07 And it applies an alternative to fix the deprecated functions: gdk_screen_width gdk_screen_height
Diffstat (limited to 'src/procman.cpp')
-rw-r--r--src/procman.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/procman.cpp b/src/procman.cpp
index f0dd09d..3cc51a5 100644
--- a/src/procman.cpp
+++ b/src/procman.cpp
@@ -343,9 +343,8 @@ procman_data_new (GSettings *settings)
g_free (color);
/* Sanity checks */
- gdk_window_get_geometry (gdk_screen_get_root_window (gdk_screen_get_default()),
- NULL, NULL, &swidth, &sheight);
-
+ swidth = WidthOfScreen (gdk_x11_screen_get_xscreen (gdk_screen_get_default ()));
+ sheight = HeightOfScreen (gdk_x11_screen_get_xscreen (gdk_screen_get_default ()));
pd->config.width = CLAMP (pd->config.width, 50, swidth);
pd->config.height = CLAMP (pd->config.height, 50, sheight);
pd->config.update_interval = MAX (pd->config.update_interval, 1000);