summaryrefslogtreecommitdiff
path: root/stickynotes/stickynotes_applet.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2017-12-05 00:27:00 +0100
committerPablo Barciela <[email protected]>2017-12-05 01:11:03 +0100
commit9736a57f3a39d293daf30401a5ae8463a42b76e4 (patch)
treedd58f141d9d0c73f03fefb2054e17807eb617813 /stickynotes/stickynotes_applet.c
parent462cff94c554f3146c6fa7091bc3ff7765fb558a (diff)
downloadmate-applets-9736a57f3a39d293daf30401a5ae8463a42b76e4.tar.bz2
mate-applets-9736a57f3a39d293daf30401a5ae8463a42b76e4.tar.xz
WidthOfScreen and HeightOfScreen implementation
This commit reverts: https://github.com/mate-desktop/mate-applets/commit/d809e57c7b09f545f1cf847f514fa738d44ac2b3 https://github.com/mate-desktop/mate-applets/commit/2f5515815c1f6c9b66f85d6ec228aad7aea0b441 And it applies an alternative to fix the deprecated functions: gdk_screen_get_width gdk_screen_get_height gdk_screen_width gdk_screen_height
Diffstat (limited to 'stickynotes/stickynotes_applet.c')
-rw-r--r--stickynotes/stickynotes_applet.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/stickynotes/stickynotes_applet.c b/stickynotes/stickynotes_applet.c
index 2f1b4b76..c7c88ac2 100644
--- a/stickynotes/stickynotes_applet.c
+++ b/stickynotes/stickynotes_applet.c
@@ -24,6 +24,7 @@
#include "stickynotes.h"
#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
StickyNotes *stickynotes = NULL;
@@ -154,8 +155,6 @@ stickynotes_destroy (GtkWidget *widget,
void
stickynotes_applet_init (MatePanelApplet *mate_panel_applet)
{
- gint sc_height;
-
stickynotes = g_new(StickyNotes, 1);
stickynotes->notes = NULL;
@@ -191,10 +190,7 @@ stickynotes_applet_init (MatePanelApplet *mate_panel_applet)
G_CALLBACK (preferences_apply_cb), NULL);
/* Max height for large notes*/
- 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;
+ stickynotes->max_height = 0.8 * HeightOfScreen (gdk_x11_screen_get_xscreen (gdk_screen_get_default ()));
/* Load sticky notes */
stickynotes_load (gtk_widget_get_screen (GTK_WIDGET (mate_panel_applet)));