From cb2a92d0c9518ddde4d2155b5f8a62b9d231ec82 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Thu, 14 Dec 2017 22:56:11 +0100 Subject: WidthOfScreen and HeightOfScreen implementation This commit reverts: https://github.com/mate-desktop/libmatekbd/commit/854356d2f21bbdd8a45093f360782339d5edb468 And it applies an alternative to fix the deprecated functions: gdk_screen_get_width gdk_screen_get_height --- libmatekbd/matekbd-util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libmatekbd/matekbd-util.c b/libmatekbd/matekbd-util.c index 83993ea..761e428 100644 --- a/libmatekbd/matekbd-util.c +++ b/libmatekbd/matekbd-util.c @@ -29,6 +29,8 @@ #include +#include + #include static void @@ -77,11 +79,9 @@ matekbd_preview_load_position (void) if (x == -1 || y == -1 || w == -1 || h == -1) { /* default values should be treated as * "0.75 of the screen size" */ - gint w, h; GdkScreen *scr = gdk_screen_get_default (); - - gdk_window_get_geometry (gdk_screen_get_root_window (scr), NULL, NULL, - &w, &h); + gint w = WidthOfScreen (gdk_x11_screen_get_xscreen (scr)); + gint h = HeightOfScreen (gdk_x11_screen_get_xscreen (scr)); rv->x = w >> 3; rv->y = h >> 3; rv->width = w - (w >> 2); -- cgit v1.2.1