summaryrefslogtreecommitdiff
path: root/src/mate-screensaver-preferences.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/mate-screensaver-preferences.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/mate-screensaver-preferences.c')
-rw-r--r--src/mate-screensaver-preferences.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mate-screensaver-preferences.c b/src/mate-screensaver-preferences.c
index 4c4ca36..5ef351a 100644
--- a/src/mate-screensaver-preferences.c
+++ b/src/mate-screensaver-preferences.c
@@ -1284,13 +1284,9 @@ constrain_list_size (GtkWidget *widget,
{
GtkRequisition req;
int max_height;
- int sc_height;
/* constrain height to be the tree height up to a max */
- gdk_window_get_geometry (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
- NULL, NULL, NULL, &sc_height);
-
- max_height = sc_height / 4;
+ max_height = (HeightOfScreen (gdk_x11_screen_get_xscreen (gtk_widget_get_screen (widget)))) / 4;
gtk_widget_get_preferred_size (to_size, &req, NULL);
allocation->height = MIN (req.height, max_height);