From 2f5515815c1f6c9b66f85d6ec228aad7aea0b441 Mon Sep 17 00:00:00 2001 From: ZenWalker Date: Wed, 9 Aug 2017 23:02:31 +0200 Subject: avoid deprecated gdk_screen_get_width/height --- stickynotes/stickynotes_applet.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'stickynotes') diff --git a/stickynotes/stickynotes_applet.c b/stickynotes/stickynotes_applet.c index 6f39b78b..2f1b4b76 100644 --- a/stickynotes/stickynotes_applet.c +++ b/stickynotes/stickynotes_applet.c @@ -154,6 +154,8 @@ stickynotes_destroy (GtkWidget *widget, void stickynotes_applet_init (MatePanelApplet *mate_panel_applet) { + gint sc_height; + stickynotes = g_new(StickyNotes, 1); stickynotes->notes = NULL; @@ -189,7 +191,10 @@ stickynotes_applet_init (MatePanelApplet *mate_panel_applet) G_CALLBACK (preferences_apply_cb), NULL); /* Max height for large notes*/ - stickynotes->max_height = 0.8*gdk_screen_get_height( gdk_screen_get_default() ); + gdk_window_get_geometry (gdk_screen_get_root_window (gdk_screen_get_default()), NULL, NULL, + NULL, &sc_height); + + stickynotes->max_height = 0.8 * sc_height; /* Load sticky notes */ stickynotes_load (gtk_widget_get_screen (GTK_WIDGET (mate_panel_applet))); -- cgit v1.2.1