summaryrefslogtreecommitdiff
path: root/src/mate-screensaver-preferences.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mate-screensaver-preferences.c')
-rw-r--r--src/mate-screensaver-preferences.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mate-screensaver-preferences.c b/src/mate-screensaver-preferences.c
index b719f38..19db7d5 100644
--- a/src/mate-screensaver-preferences.c
+++ b/src/mate-screensaver-preferences.c
@@ -1212,7 +1212,11 @@ constrain_list_size (GtkWidget *widget,
/* constrain height to be the tree height up to a max */
max_height = (gdk_screen_get_height (gtk_widget_get_screen (widget))) / 4;
+#if GTK_CHECK_VERSION(3, 0, 0)
+ gtk_widget_get_preferred_size (to_size, &req, NULL);
+#else
gtk_widget_size_request (to_size, &req);
+#endif
requisition->height = MIN (req.height, max_height);
}