From c4ef1d8e0a7db46f4cb8ccf18e80cdd1672926f6 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sun, 10 Sep 2017 20:38:43 +0200 Subject: avoid deprecated gdk_screen_get_height --- mate-volume-control/gvc-sound-theme-chooser.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mate-volume-control/gvc-sound-theme-chooser.c b/mate-volume-control/gvc-sound-theme-chooser.c index 5a2f091..4034c6f 100644 --- a/mate-volume-control/gvc-sound-theme-chooser.c +++ b/mate-volume-control/gvc-sound-theme-chooser.c @@ -1000,10 +1000,14 @@ setup_list_size_constraint (GtkWidget *widget, GtkWidget *to_size) { GtkRequisition req; + gint sc_height; int max_height; /* Constrain height to be the tree height up to a max */ - max_height = (gdk_screen_get_height (gtk_widget_get_screen (widget))) / 4; + gdk_window_get_geometry (gdk_screen_get_root_window (gtk_widget_get_screen (widget)), + NULL, NULL, NULL, &sc_height); + + max_height = sc_height / 4; // XXX this doesn't work gtk_widget_get_preferred_size (to_size, NULL, &req); -- cgit v1.2.1