summaryrefslogtreecommitdiff
path: root/src/daemon/stack.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2018-01-28 20:16:44 +0300
committerraveit65 <[email protected]>2018-01-30 09:09:33 +0100
commitbc42c561e29041c168b806a5618580066aa8a222 (patch)
treed5889961598cb89dc7231b4fbbdc0266c01bc1c0 /src/daemon/stack.c
parent4a4687f22d854e5d4736830f513c577439e42151 (diff)
downloadmate-notification-daemon-bc42c561e29041c168b806a5618580066aa8a222.tar.bz2
mate-notification-daemon-bc42c561e29041c168b806a5618580066aa8a222.tar.xz
require GTK+ 3.22 and GLib 2.50
and drop additional checks for min/max GLib versions, it's not needed
Diffstat (limited to 'src/daemon/stack.c')
-rw-r--r--src/daemon/stack.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/daemon/stack.c b/src/daemon/stack.c
index 25514f7..d1a02db 100644
--- a/src/daemon/stack.c
+++ b/src/daemon/stack.c
@@ -36,11 +36,7 @@
struct _NotifyStack {
NotifyDaemon* daemon;
GdkScreen* screen;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor;
-#else
- guint monitor;
-#endif
NotifyStackLocation location;
GList* windows;
guint update_id;
@@ -193,7 +189,6 @@ translate_coordinates (NotifyStackLocation stack_location,
}
}
-#if GTK_CHECK_VERSION(3, 22, 0)
static int
_gtk_get_monitor_num (GdkMonitor *monitor)
{
@@ -210,31 +205,20 @@ _gtk_get_monitor_num (GdkMonitor *monitor)
return -1;
}
-#endif
NotifyStack *
notify_stack_new (NotifyDaemon *daemon,
GdkScreen *screen,
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor,
-#else
- guint monitor,
-#endif
NotifyStackLocation location)
{
NotifyStack *stack;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkDisplay *display;
display = gdk_screen_get_display (screen);
-#endif
g_assert (daemon != NULL);
g_assert (screen != NULL && GDK_IS_SCREEN (screen));
-#if GTK_CHECK_VERSION (3, 22, 0)
g_assert ((guint)_gtk_get_monitor_num (monitor) < (guint)gdk_display_get_n_monitors (display));
-#else
- g_assert (monitor < (guint)gdk_screen_get_n_monitors (screen));
-#endif
g_assert (location != NOTIFY_STACK_LOCATION_UNKNOWN);
stack = g_new0 (NotifyStack, 1);
@@ -307,13 +291,7 @@ notify_stack_shift_notifications (NotifyStack *stack,
int n_wins;
get_work_area (stack, &workarea);
-#if GTK_CHECK_VERSION (3, 22, 0)
- gdk_monitor_get_geometry (stack->monitor, &monitor);
-#else
- gdk_screen_get_monitor_geometry (stack->screen,
- stack->monitor,
- &monitor);
-#endif
+ gdk_monitor_get_geometry (stack->monitor, &monitor);
gdk_rectangle_intersect (&monitor, &workarea, &workarea);
add_padding_to_rect (&workarea);