summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-08-07 01:10:09 +0200
committerZenWalker <[email protected]>2017-08-07 01:10:09 +0200
commit854356d2f21bbdd8a45093f360782339d5edb468 (patch)
tree97f6c2661ab54fd24a53e09ca3dabd2c450f968b
parentd6ff9aaa0e1be1a1674cd6c0995ae1f289efd632 (diff)
downloadlibmatekbd-854356d2f21bbdd8a45093f360782339d5edb468.tar.bz2
libmatekbd-854356d2f21bbdd8a45093f360782339d5edb468.tar.xz
avoid deprecated gdk_screen_get_width/height
-rw-r--r--libmatekbd/matekbd-util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libmatekbd/matekbd-util.c b/libmatekbd/matekbd-util.c
index 91d1a37..83993ea 100644
--- a/libmatekbd/matekbd-util.c
+++ b/libmatekbd/matekbd-util.c
@@ -77,9 +77,11 @@ 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 ();
- gint w = gdk_screen_get_width (scr);
- gint h = gdk_screen_get_height (scr);
+
+ gdk_window_get_geometry (gdk_screen_get_root_window (scr), NULL, NULL,
+ &w, &h);
rv->x = w >> 3;
rv->y = h >> 3;
rv->width = w - (w >> 2);