summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2017-12-05 00:08:25 +0100
committerraveit65 <[email protected]>2017-12-17 11:17:23 +0100
commit856cd3f1d50d4573754ad08c69a40362eea075d0 (patch)
treed6e0694fcb8ff914142f21b78c3af62429744165
parenta1545443a5d2abedb97fb75632f96331c2659cb2 (diff)
downloadpluma-856cd3f1d50d4573754ad08c69a40362eea075d0.tar.bz2
pluma-856cd3f1d50d4573754ad08c69a40362eea075d0.tar.xz
WidthOfScreen and HeightOfScreen implementation
This commit reverts: https://github.com/mate-desktop/pluma/commit/5bece5503aba40119eea2e2d5e18f219749472be And it applies an alternative to fix the deprecated functions: gdk_screen_get_width gdk_screen_get_height
-rw-r--r--pluma/pluma-app.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pluma/pluma-app.c b/pluma/pluma-app.c
index 409547ae..16d49275 100644
--- a/pluma/pluma-app.c
+++ b/pluma/pluma-app.c
@@ -657,8 +657,8 @@ is_in_viewport (PlumaWindow *window,
x += vp_x;
y += vp_y;
- gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL,
- &sc_width, &sc_height);
+ sc_width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen));
+ sc_height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen));
return x + width * .25 >= viewport_x &&
x + width * .75 <= viewport_x + sc_width &&