summaryrefslogtreecommitdiff
path: root/src/gs-manager.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2017-12-11 20:02:10 +0100
committerraveit65 <[email protected]>2017-12-19 13:15:06 +0100
commit65094d38e0982e735bfd966854f8a106e4001a16 (patch)
treeaf5c670ad4b0ef06e7f2dab5bc8d26f755175f07 /src/gs-manager.c
parent02cddedebbfa962fdeba0324e2786bd221459ad5 (diff)
downloadmate-screensaver-65094d38e0982e735bfd966854f8a106e4001a16.tar.bz2
mate-screensaver-65094d38e0982e735bfd966854f8a106e4001a16.tar.xz
WidthOfScreen and HeightOfScreen implementation
This commit reverts: https://github.com/mate-desktop/mate-screensaver/commit/816394c1a6ce9968dba3e1b0ecc884c8ccca4d43 And it applies an alternative to fix the deprecated functions: gdk_screen_get_width gdk_screen_get_height
Diffstat (limited to 'src/gs-manager.c')
-rw-r--r--src/gs-manager.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gs-manager.c b/src/gs-manager.c
index 03ee338..130227b 100644
--- a/src/gs-manager.c
+++ b/src/gs-manager.c
@@ -1320,10 +1320,8 @@ apply_background_to_window (GSManager *manager,
display = gs_window_get_display (window);
screen = gdk_display_get_default_screen (display);
-
- gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL,
- &width, &height);
-
+ width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen));
+ height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen));
gs_debug ("Creating background w:%d h:%d", width, height);
surface = mate_bg_create_surface (manager->priv->bg,
gs_window_get_gdk_window (window),