diff options
author | ZenWalker <[email protected]> | 2017-08-10 17:17:56 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2017-08-10 17:17:56 +0200 |
commit | 6d94559673232a1dc01d16eacbe2028aae175d07 (patch) | |
tree | 7a5b2d8e6e803cac76bb48a623045a02af3109d3 | |
parent | 478839373af438fce52908100f7947b920897a38 (diff) | |
download | mate-system-monitor-6d94559673232a1dc01d16eacbe2028aae175d07.tar.bz2 mate-system-monitor-6d94559673232a1dc01d16eacbe2028aae175d07.tar.xz |
avoid deprecated gdk_screen_width/height
-rw-r--r-- | src/procman.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/procman.cpp b/src/procman.cpp index ea50cb2..f0dd09d 100644 --- a/src/procman.cpp +++ b/src/procman.cpp @@ -343,8 +343,9 @@ procman_data_new (GSettings *settings) g_free (color); /* Sanity checks */ - swidth = gdk_screen_width (); - sheight = gdk_screen_height (); + gdk_window_get_geometry (gdk_screen_get_root_window (gdk_screen_get_default()), + NULL, NULL, &swidth, &sheight); + 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); |