summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerberos <[email protected]>2012-01-01 18:46:00 -0300
committerPerberos <[email protected]>2012-01-01 18:46:00 -0300
commit456dc22287e3135a2702f5759af375c5606e8715 (patch)
tree0c7f89302a3dca7736c7a58ac8fdcc6698fae331 /src
parentec315ced4c463abe0db561867e54454a370c269c (diff)
downloadmate-notification-daemon-456dc22287e3135a2702f5759af375c5606e8715.tar.bz2
mate-notification-daemon-456dc22287e3135a2702f5759af375c5606e8715.tar.xz
GDK_DISPLAY() is deprecated
Diffstat (limited to 'src')
-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