diff options
Diffstat (limited to 'stickynotes')
-rw-r--r-- | stickynotes/stickynotes.c | 9 | ||||
-rw-r--r-- | stickynotes/stickynotes_applet_callbacks.c | 9 | ||||
-rw-r--r-- | stickynotes/util.c | 10 |
3 files changed, 3 insertions, 25 deletions
diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c index 77439795..2a2cad17 100644 --- a/stickynotes/stickynotes.c +++ b/stickynotes/stickynotes.c @@ -54,12 +54,7 @@ set_icon_geometry (GdkWindow *window, int height) { gulong data[4]; -#if GTK_CHECK_VERSION (3, 0, 0) Display *dpy = gdk_x11_display_get_xdisplay (gdk_window_get_display (window)); -#else - Display *dpy = gdk_x11_drawable_get_xdisplay (window); -#endif - data[0] = x; data[1] = y; data[2] = width; @@ -68,11 +63,7 @@ set_icon_geometry (GdkWindow *window, XChangeProperty (dpy, GDK_WINDOW_XID (window), gdk_x11_get_xatom_by_name_for_display ( -#if GTK_CHECK_VERSION (3, 0, 0) gdk_window_get_display (window), -#else - gdk_drawable_get_display (window), -#endif "_NET_WM_ICON_GEOMETRY"), XA_CARDINAL, 32, PropModeReplace, (guchar *)&data, 4); diff --git a/stickynotes/stickynotes_applet_callbacks.c b/stickynotes/stickynotes_applet_callbacks.c index 6efece25..038509eb 100644 --- a/stickynotes/stickynotes_applet_callbacks.c +++ b/stickynotes/stickynotes_applet_callbacks.c @@ -168,14 +168,9 @@ void install_check_click_on_desktop (void) return; } -#if GTK_CHECK_VERSION (3, 0, 0) /* Access the desktop window. desktop_window is the root window for the * default screen, so we know using gdk_display_get_default() is correct. */ window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), desktop_window); -#else - /* Access the desktop window */ - window = gdk_window_foreign_new (desktop_window); -#endif /* It may contain an atom to tell us which other window to monitor */ user_time_window = gdk_x11_get_xatom_by_name ("_NET_WM_USER_TIME_WINDOW"); @@ -203,11 +198,7 @@ void install_check_click_on_desktop (void) { /* We have another window to monitor */ desktop_window = *data; -#if GTK_CHECK_VERSION (3, 0, 0) window = gdk_x11_window_foreign_new_for_display (gdk_window_get_display (window), desktop_window); -#else - window = gdk_window_foreign_new (desktop_window); -#endif } } } diff --git a/stickynotes/util.c b/stickynotes/util.c index 6748c7fc..9f395093 100644 --- a/stickynotes/util.c +++ b/stickynotes/util.c @@ -28,10 +28,6 @@ #include <gdk/gdkx.h> #include <gtk/gtk.h> -#if GTK_CHECK_VERSION (3, 0, 0) -#define GDK_WINDOW_XWINDOW GDK_WINDOW_XID -#endif - /* Returns the current date in a customizable form, the default * looks like this: "Nov 30, '78" */ gchar * get_current_date(const gchar *format) @@ -92,9 +88,9 @@ xstuff_get_current_workspace (GtkWindow *window) int retval; Display *gdk_display; - root_window = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window ( + root_window = GDK_WINDOW_XID (gdk_screen_get_root_window ( gtk_widget_get_screen (GTK_WIDGET (window)))); - root_window = GDK_WINDOW_XWINDOW (gtk_widget_get_window (GTK_WIDGET (window))); + root_window = GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window))); gdk_display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); gdk_error_trap_push (); @@ -129,7 +125,7 @@ xstuff_change_workspace (GtkWindow *window, Screen *screen; gdk_display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); - xwindow = GDK_WINDOW_XWINDOW (GDK_WINDOW (gtk_widget_get_window (GTK_WIDGET (window)))); + xwindow = GDK_WINDOW_XID (GDK_WINDOW (gtk_widget_get_window (GTK_WIDGET (window)))); screen = GDK_SCREEN_XSCREEN (gtk_widget_get_screen (GTK_WIDGET (window))); xev.xclient.type = ClientMessage; |