summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-09-10 20:38:43 +0200
committerraveit65 <[email protected]>2017-09-10 20:38:43 +0200
commitc4ef1d8e0a7db46f4cb8ccf18e80cdd1672926f6 (patch)
treea9e6a2e79d9f1f1ed3af5b2a385016d0672c71e9
parent0c7ce6afd9ff1fbfee1cef34dd00ec1027e82aeb (diff)
downloadmate-media-c4ef1d8e0a7db46f4cb8ccf18e80cdd1672926f6.tar.bz2
mate-media-c4ef1d8e0a7db46f4cb8ccf18e80cdd1672926f6.tar.xz
avoid deprecated gdk_screen_get_height
-rw-r--r--mate-volume-control/gvc-sound-theme-chooser.c6
1 files changed, 5 insertions, 1 deletions
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);