summaryrefslogtreecommitdiff
path: root/src/themes/nodoka/nodoka-theme.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2017-12-12 20:36:29 +0100
committerPablo Barciela <[email protected]>2017-12-12 20:44:34 +0100
commit34faef680f7b084a1e9d844a438473c90f7d2224 (patch)
tree57939899c0fa2456be284fdc4edd1276b17a3f4c /src/themes/nodoka/nodoka-theme.c
parentf981a2b53fe54e3489d3b14aa0dd04047d3cd6aa (diff)
downloadmate-notification-daemon-34faef680f7b084a1e9d844a438473c90f7d2224.tar.bz2
mate-notification-daemon-34faef680f7b084a1e9d844a438473c90f7d2224.tar.xz
WidthOfScreen and HeightOfScreen implementation
This commit reverts: https://github.com/mate-desktop/mate-notification-daemon/commit/52b7c3807e71278f2d902a79cf6c08c839a1b0ad And it applies an alternative to fix the deprecated functions: gdk_screen_get_width gdk_screen_get_height
Diffstat (limited to 'src/themes/nodoka/nodoka-theme.c')
-rw-r--r--src/themes/nodoka/nodoka-theme.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/themes/nodoka/nodoka-theme.c b/src/themes/nodoka/nodoka-theme.c
index ac99033..4d3a2a1 100644
--- a/src/themes/nodoka/nodoka-theme.c
+++ b/src/themes/nodoka/nodoka-theme.c
@@ -27,6 +27,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
/* Define basic nodoka types */
typedef void (*ActionInvokedCb)(GtkWindow *nw, const char *key);
@@ -137,8 +138,8 @@ get_notification_arrow_type(GtkWidget *nw)
WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata");
int screen_height;
- gdk_window_get_geometry (gdk_screen_get_root_window (gdk_window_get_screen (gtk_widget_get_window (nw))),
- NULL, NULL, NULL, &screen_height);
+ screen_height = HeightOfScreen (gdk_x11_screen_get_xscreen (
+ gdk_window_get_screen (gtk_widget_get_window (nw))));
if (windata->arrow.position.y + windata->height + DEFAULT_ARROW_HEIGHT >
screen_height)
@@ -159,8 +160,8 @@ set_arrow_parameters (WindowData *windata)
int x,y;
GtkArrowType arrow_type;
- gdk_window_get_geometry (gdk_screen_get_root_window (gdk_window_get_screen (gtk_widget_get_window (windata->win))),
- NULL, NULL, &screen_width, NULL);
+ screen_width = WidthOfScreen (gdk_x11_screen_get_xscreen (
+ gdk_window_get_screen (gtk_widget_get_window (windata->win))));
/* Set arrow offset */
GtkAllocation alloc;