summaryrefslogtreecommitdiff
path: root/trashapplet/src
diff options
context:
space:
mode:
Diffstat (limited to 'trashapplet/src')
-rw-r--r--trashapplet/src/xstuff.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/trashapplet/src/xstuff.c b/trashapplet/src/xstuff.c
index 75ae8eb3..62f7c6bc 100644
--- a/trashapplet/src/xstuff.c
+++ b/trashapplet/src/xstuff.c
@@ -24,11 +24,6 @@
#include "xstuff.h"
-#if GTK_CHECK_VERSION (3, 0, 0)
-#define GDK_WINDOW_XWINDOW(x) GDK_WINDOW_XID(x)
-#define gdk_x11_drawable_get_xid(x) GDK_WINDOW_XID(x)
-#endif
-
static Atom
panel_atom_get (const char *atom_name)
{
@@ -162,7 +157,7 @@ xstuff_is_compliant_wm (void)
int size;
xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
- root_window = GDK_WINDOW_XWINDOW (
+ root_window = GDK_WINDOW_XID (
gdk_get_default_root_window ());
/* FIXME this is totally broken; should be using
@@ -197,11 +192,11 @@ xstuff_set_no_group (GdkWindow *win)
XWMHints wmhints = {0};
XDeleteProperty (GDK_WINDOW_XDISPLAY (win),
- GDK_WINDOW_XWINDOW (win),
+ GDK_WINDOW_XID (win),
panel_atom_get ("WM_CLIENT_LEADER"));
old_wmhints = XGetWMHints (GDK_WINDOW_XDISPLAY (win),
- GDK_WINDOW_XWINDOW (win));
+ GDK_WINDOW_XID (win));
/* General paranoia */
if (old_wmhints != NULL) {
memcpy (&wmhints, old_wmhints, sizeof (XWMHints));
@@ -217,7 +212,7 @@ xstuff_set_no_group (GdkWindow *win)
}
XSetWMHints (GDK_WINDOW_XDISPLAY (win),
- GDK_WINDOW_XWINDOW (win),
+ GDK_WINDOW_XID (win),
&wmhints);
}
@@ -250,7 +245,7 @@ xstuff_set_pos_size (GdkWindow *window, int x, int y, int w, int h)
gdk_error_trap_push ();
XSetWMNormalHints (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
&size_hints);
gdk_window_move_resize (window, x, y, w, h);
@@ -278,7 +273,7 @@ xstuff_set_wmspec_dock_hints (GdkWindow *window,
}
XChangeProperty (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
panel_atom_get ("_NET_WM_WINDOW_TYPE"),
XA_ATOM, 32, PropModeReplace,
(unsigned char *) atoms,
@@ -300,7 +295,7 @@ xstuff_set_wmspec_strut (GdkWindow *window,
vals [3] = bottom;
XChangeProperty (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
panel_atom_get ("_NET_WM_STRUT"),
XA_CARDINAL, 32, PropModeReplace,
(unsigned char *) vals, 4);
@@ -310,7 +305,7 @@ void
xstuff_delete_property (GdkWindow *window, const char *name)
{
Display *xdisplay = GDK_WINDOW_XDISPLAY (window);
- Window xwindow = GDK_WINDOW_XWINDOW (window);
+ Window xwindow = GDK_WINDOW_XID (window);
XDeleteProperty (xdisplay, xwindow,
panel_atom_get (name));
@@ -342,7 +337,7 @@ draw_zoom_animation (GdkScreen *gscreen,
int depth;
dpy = gdk_x11_display_get_xdisplay (gdk_screen_get_display (gscreen));
- root_win = gdk_x11_drawable_get_xid (gdk_screen_get_root_window (gscreen));
+ root_win = GDK_WINDOW_XID (gdk_screen_get_root_window (gscreen));
screen = gdk_screen_get_number (gscreen);
#if GTK_CHECK_VERSION (3, 0, 0)
depth = DefaultDepth(dpy,screen);
@@ -495,15 +490,11 @@ xstuff_get_current_workspace (GdkScreen *screen)
int result;
int retval;
- root_window = gdk_x11_drawable_get_xid (
+ root_window = GDK_WINDOW_XID (
gdk_screen_get_root_window (screen));
gdk_error_trap_push ();
-#if GTK_CHECK_VERSION (3, 0, 0)
result = XGetWindowProperty (GDK_SCREEN_XDISPLAY (screen),
-#else
- result = XGetWindowProperty (gdk_display,
-#endif
root_window,
panel_atom_get ("_NET_CURRENT_DESKTOP"),
0, G_MAXLONG,
@@ -545,11 +536,11 @@ xstuff_grab_key_on_all_screens (int keycode,
if (grab)
XGrabKey (gdk_x11_display_get_xdisplay (display),
keycode, modifiers,
- gdk_x11_drawable_get_xid (root),
+ GDK_WINDOW_XID (root),
True, GrabModeAsync, GrabModeAsync);
else
XUngrabKey (gdk_x11_display_get_xdisplay (display),
keycode, modifiers,
- gdk_x11_drawable_get_xid (root));
+ GDK_WINDOW_XID (root));
}
}