summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/daemon/stack.c50
1 files changed, 14 insertions, 36 deletions
diff --git a/src/daemon/stack.c b/src/daemon/stack.c
index 95b50da..1f15ce4 100644
--- a/src/daemon/stack.c
+++ b/src/daemon/stack.c
@@ -63,11 +63,7 @@ get_work_area (NotifyStack *stack,
int result;
int disp_screen;
- #if GTK_CHECK_VERSION(3, 0, 0)
- workarea = XInternAtom(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), "_NET_WORKAREA", True);
- #else
- workarea = XInternAtom(GDK_DISPLAY(), "_NET_WORKAREA", True);
- #endif
+ workarea = XInternAtom(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), "_NET_WORKAREA", True);
disp_screen = GDK_SCREEN_XNUMBER (stack->screen);
@@ -82,39 +78,21 @@ get_work_area (NotifyStack *stack,
return FALSE;
- #if GTK_CHECK_VERSION(3, 0, 0)
+ win = XRootWindow(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), disp_screen);
- win = XRootWindow(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), disp_screen);
+ result = XGetWindowProperty(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()),
+ win,
+ workarea,
+ 0,
+ max_len,
+ False,
+ AnyPropertyType,
+ &type,
+ &format,
+ &num,
+ &leftovers,
+ &ret_workarea);
- result = XGetWindowProperty(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()),
- win,
- workarea,
- 0,
- max_len,
- False,
- AnyPropertyType,
- &type,
- &format,
- &num,
- &leftovers,
- &ret_workarea);
- #else
-
- win = XRootWindow(GDK_DISPLAY(), disp_screen);
-
- result = XGetWindowProperty(GDK_DISPLAY(),
- win,
- workarea,
- 0,
- max_len,
- False,
- AnyPropertyType,
- &type,
- &format,
- &num,
- &leftovers,
- &ret_workarea);
- #endif
if (result != Success
|| type == None