summaryrefslogtreecommitdiff
path: root/src/daemon/stack.c
diff options
context:
space:
mode:
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);