diff --git a/configure.ac b/configure.ac
index 4ba1674..32abd48 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,11 +40,11 @@ AM_GLIB_GNU_GETTEXT
 DBUS_REQUIRED_VERSION=0.30
 GLIB_REQUIRED_VERSION=2.15.0
 GCONF_REQUIRED_VERSION=2.6.1
-GDK_REQUIRED_VERSION=2.14.0
-GTK_REQUIRED_VERSION=2.19.7
+GDK_REQUIRED_VERSION=2.90.7
+GTK_REQUIRED_VERSION=2.90.7
 X11_REQUIRED_VERSION=1.0
 LIBGNOME_MENU_REQUIRED_VERSION=2.11.1
-GNOME_DESKTOP_REQUIRED_VERSION=2.29.0
+GNOME_DESKTOP_REQUIRED_VERSION=2.90.0
 
 LIBGNOMEKBDUI_REQUIRED_VERSION=0.1
 
@@ -58,10 +58,10 @@ AC_TYPE_UID_T
 AC_CHECK_FUNCS([setresuid setenv unsetenv clearenv])
 PKG_CHECK_MODULES(GNOME_SCREENSAVER,
         x11 >= $X11_REQUIRED_VERSION
-        gtk+-2.0 >= $GTK_REQUIRED_VERSION
+        gtk+-3.0 >= $GTK_REQUIRED_VERSION
         dbus-glib-1 >= $DBUS_REQUIRED_VERSION
         gconf-2.0 >= $GCONF_REQUIRED_VERSION
-        gnome-desktop-2.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
+        gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
         libgnome-menu >= $LIBGNOME_MENU_REQUIRED_VERSION)
 AC_SUBST(GNOME_SCREENSAVER_CFLAGS)
 AC_SUBST(GNOME_SCREENSAVER_LIBS)
@@ -69,14 +69,14 @@ AC_SUBST(GNOME_SCREENSAVER_LIBS)
 PKG_CHECK_MODULES(GNOME_SCREENSAVER_DIALOG,
         gconf-2.0 >= $GCONF_REQUIRED_VERSION
         gthread-2.0
-        gtk+-2.0 >= $GTK_REQUIRED_VERSION)
+        gtk+-3.0 >= $GTK_REQUIRED_VERSION)
 AC_SUBST(GNOME_SCREENSAVER_DIALOG_CFLAGS)
 AC_SUBST(GNOME_SCREENSAVER_DIALOG_LIBS)
 
 PKG_CHECK_MODULES(GNOME_SCREENSAVER_CAPPLET,
         gio-2.0 >= $GLIB_REQUIRED_VERSION
         gconf-2.0 >= $GCONF_REQUIRED_VERSION
-        gtk+-2.0 >= $GTK_REQUIRED_VERSION
+        gtk+-3.0 >= $GTK_REQUIRED_VERSION
         libgnome-menu >= $LIBGNOME_MENU_REQUIRED_VERSION)
 AC_SUBST(GNOME_SCREENSAVER_CAPPLET_CFLAGS)
 AC_SUBST(GNOME_SCREENSAVER_CAPPLET_LIBS)
@@ -108,7 +108,7 @@ esac
 
 # Optional dependencies for the theme engines
 
-SAVER_MODULES="gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED_VERSION"
+SAVER_MODULES="gthread-2.0 gtk+-3.0 >= $GTK_REQUIRED_VERSION"
 
 PKG_CHECK_MODULES(GNOME_SCREENSAVER_SAVER, $SAVER_MODULES)
 AC_SUBST(GNOME_SCREENSAVER_SAVER_CFLAGS)
@@ -171,7 +171,7 @@ AC_SUBST(PAM_PREFIX)
 # Desktop entry handling
 
 PKG_CHECK_MODULES(LIB_GNOME_MENU,
-        gtk+-2.0 >= $GTK_REQUIRED_VERSION)
+        gtk+-3.0 >= $GTK_REQUIRED_VERSION)
 
 AC_SUBST(LIB_GNOME_MENU_CFLAGS)
 AC_SUBST(LIB_GNOME_MENU_LIBS)
diff --git a/savers/floaters.c b/savers/floaters.c
index 01bf0b2..e3be5e9 100644
--- a/savers/floaters.c
+++ b/savers/floaters.c
@@ -1021,7 +1021,7 @@ screen_saver_on_expose_event (ScreenSaver    *screen_saver,
   for (tmp = screen_saver->floaters; tmp != NULL; tmp = tmp->next)
     {
       ScreenSaverFloater *floater;
-      GdkRectangle rect;
+      cairo_rectangle_int_t rect;
       gint size;
 
       floater = (ScreenSaverFloater *) tmp->data;
@@ -1034,7 +1034,7 @@ screen_saver_on_expose_event (ScreenSaver    *screen_saver,
       rect.width = G_SQRT2 * size;
       rect.height = G_SQRT2 * size;
 
-      if (!gdk_region_rect_in (event->region, &rect))
+      if (!cairo_region_contains_rectangle (event->region, &rect))
         continue;
 
       if (!screen_saver_floater_do_draw (screen_saver, floater, context))
diff --git a/savers/gste-popsquares.c b/savers/gste-popsquares.c
index 6c560a0..7275e61 100644
--- a/savers/gste-popsquares.c
+++ b/savers/gste-popsquares.c
@@ -48,7 +48,6 @@ struct GSTEPopsquaresPrivate
         int        ncolors;
         int        subdivision;
 
-        GdkGC     *gc;
         GdkColor  *colors;
         square    *squares;
 
@@ -373,11 +372,6 @@ setup_colors (GSTEPopsquares *pop)
 
         set_colors (window, &fg, &bg);
 
-        if (pop->priv->gc) {
-                g_object_unref (pop->priv->gc);
-        }
-        pop->priv->gc = gdk_gc_new (window);
-
         if (pop->priv->colors) {
                 g_free (pop->priv->colors);
         }
@@ -484,6 +478,7 @@ draw_iter (GSTEPopsquares *pop)
         int      window_width;
         int      window_height;
         GdkWindow *window;
+        cairo_t *cr;
 
         window = gs_theme_engine_get_window (GS_THEME_ENGINE (pop));
 
@@ -501,14 +496,16 @@ draw_iter (GSTEPopsquares *pop)
         gh = pop->priv->subdivision;
         nsquares = gw * gh;
 
+        cr = gdk_cairo_create (window);
+
         for (y = 0; y < gh; y++) {
                 for (x = 0; x < gw; x++) {
                         square *s = (square *) &pop->priv->squares [gw * y + x];
-
-                        gdk_gc_set_foreground (pop->priv->gc, &(pop->priv->colors [s->color]));
-                        gdk_draw_rectangle (window, pop->priv->gc, TRUE, s->x, s->y,
-                                            border ? s->w - border : s->w,
-                                            border ? s->h - border : s->h);
+                        gdk_cairo_set_source_color (cr, &(pop->priv->colors [s->color]));
+                        cairo_rectangle (cr, s->x, s->y,
+                                         border ? s->w - border : s->w,
+                                         border ? s->h - border : s->h);
+                        cairo_fill (cr);
                         s->color++;
 
                         if (s->color == pop->priv->ncolors) {
@@ -521,6 +518,8 @@ draw_iter (GSTEPopsquares *pop)
                 }
         }
 
+        cairo_destroy (cr);
+
         return TRUE;
 }
 
@@ -557,7 +556,6 @@ gste_popsquares_finalize (GObject *object)
 
         g_free (pop->priv->squares);
         g_free (pop->priv->colors);
-        g_object_unref (pop->priv->gc);
 
         G_OBJECT_CLASS (parent_class)->finalize (object);
 }
diff --git a/savers/gste-slideshow.c b/savers/gste-slideshow.c
index b436078..40ada01 100644
--- a/savers/gste-slideshow.c
+++ b/savers/gste-slideshow.c
@@ -170,7 +170,6 @@ start_fade (GSTESlideshow *show,
         if (gdk_pixbuf_get_has_alpha (pixbuf) && show->priv->background_color) {
                 GdkPixbuf *colored;
                 guint32    color;
-                GdkPixmap *pixmap;
 
                 color = (show->priv->background_color->red << 16)
                         + (show->priv->background_color->green / 256 << 8)
@@ -182,17 +181,10 @@ start_fade (GSTESlideshow *show,
                                                              256,
                                                              color,
                                                              color);
-#if GTK_CHECK_VERSION (2,21,1)
-                pixmap = gdk_pixmap_new (NULL, ph, pw,  gdk_visual_get_depth (gdk_visual_get_system ()));
-#else
-                pixmap = gdk_pixmap_new (NULL, ph, pw,  gdk_visual_get_system ()->depth);
-#endif
-
-                gdk_draw_pixbuf (pixmap, NULL, colored, 0, 0, 0, 0, -1, -1, GDK_RGB_DITHER_MAX, 0, 0);
-                gdk_pixbuf_get_from_drawable (pixbuf, pixmap, NULL, 0, 0, 0, 0, -1, -1);
-
-                g_object_unref (pixmap);
-
+                gdk_pixbuf_copy_area (colored, 0, 0,
+                                      gdk_pixbuf_get_width (colored),
+                                      gdk_pixbuf_get_height (colored),
+                                      pixbuf, 0, 0);
                 g_object_unref(colored);
         }
 
@@ -924,7 +916,7 @@ set_colormap (GtkWidget *widget)
         screen = gtk_widget_get_screen (widget);
         colormap = gdk_screen_get_rgba_colormap (screen);
         if (colormap == NULL) {
-                colormap = gdk_screen_get_rgb_colormap (screen);
+                colormap = gdk_screen_get_system_colormap (screen);
         }
 
         gtk_widget_set_colormap (widget, colormap);
diff --git a/src/copy-theme-dialog.c b/src/copy-theme-dialog.c
index 1feba2f..2d102de 100644
--- a/src/copy-theme-dialog.c
+++ b/src/copy-theme-dialog.c
@@ -255,7 +255,6 @@ copy_theme_dialog_init (CopyThemeDialog *dlg)
 	
 	gtk_window_set_title (GTK_WINDOW (dlg),
 	                      _("Copying themes"));
-	gtk_dialog_set_has_separator (GTK_DIALOG (dlg), FALSE);
 	gtk_container_set_border_width (GTK_CONTAINER (dlg), 6);
 	
 	gtk_widget_show_all (content_area);
diff --git a/src/gs-fade.c b/src/gs-fade.c
index 57b3718..0215829 100644
--- a/src/gs-fade.c
+++ b/src/gs-fade.c
@@ -208,7 +208,7 @@ xf86_whack_gamma (int              screen,
                         g2.blue = XF86_MIN_GAMMA;
                 }
 
-                status = XF86VidModeSetGamma (GDK_DISPLAY (), screen, &g2);
+                status = XF86VidModeSetGamma (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), screen, &g2);
         } else {
 
 # ifdef HAVE_XF86VMODE_GAMMA_RAMP
@@ -225,7 +225,7 @@ xf86_whack_gamma (int              screen,
                         b[i] = gamma_info->b[i] * ratio;
                 }
 
-                status = XF86VidModeSetGammaRamp (GDK_DISPLAY (), screen, gamma_info->size, r, g, b);
+                status = XF86VidModeSetGammaRamp (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), screen, gamma_info->size, r, g, b);
 
                 g_free (r);
                 g_free (g);
@@ -298,7 +298,7 @@ gamma_fade_setup (GSFade *fade, int screen_idx)
         if (FADE_TYPE_GAMMA_RAMP == screen_priv->fade_type) {
                 /* have ramps */
 
-                res = XF86VidModeGetGammaRampSize (GDK_DISPLAY (), screen_idx, &screen_priv->info->size);
+                res = XF86VidModeGetGammaRampSize (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), screen_idx, &screen_priv->info->size);
                 if (!res || screen_priv->info->size <= 0) {
                         screen_priv->fade_type = FADE_TYPE_GAMMA_NUMBER;
                         goto test_number;
@@ -313,7 +313,7 @@ gamma_fade_setup (GSFade *fade, int screen_idx)
                         goto test_number;
                 }
 
-                res = XF86VidModeGetGammaRamp (GDK_DISPLAY (),
+                res = XF86VidModeGetGammaRamp (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
                                                screen_idx,
                                                screen_priv->info->size,
                                                screen_priv->info->r,
@@ -331,7 +331,7 @@ gamma_fade_setup (GSFade *fade, int screen_idx)
         if (FADE_TYPE_GAMMA_NUMBER == screen_priv->fade_type) {
                 /* only have gamma parameter, not ramps. */
 
-                res = XF86VidModeGetGamma (GDK_DISPLAY (), screen_idx, &screen_priv->vmg);
+                res = XF86VidModeGetGamma (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), screen_idx, &screen_priv->vmg);
                 if (! res) {
                         screen_priv->fade_type = FADE_TYPE_NONE;
                         goto test_none;
@@ -410,11 +410,11 @@ check_gamma_extension (GSFade *fade, int screen_idx)
         screen_priv = &fade->priv->screen_priv[screen_idx];
 
 #ifdef HAVE_XF86VMODE_GAMMA
-        res = XF86VidModeQueryExtension (GDK_DISPLAY (), &event, &error);
+        res = XF86VidModeQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &event, &error);
         if (! res)
                 goto fade_none;
 
-        res = safe_XF86VidModeQueryVersion (GDK_DISPLAY (), &major, &minor);
+        res = safe_XF86VidModeQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor);
         if (! res)
                 goto fade_none;
 
diff --git a/src/gs-grab-x11.c b/src/gs-grab-x11.c
index eeb8651..1ce940c 100644
--- a/src/gs-grab-x11.c
+++ b/src/gs-grab-x11.c
@@ -58,31 +58,6 @@ struct GSGrabPrivate
         GtkWidget *invisible;
 };
 
-static GdkCursor *
-get_cursor (void)
-{
-        GdkBitmap *empty_bitmap;
-        GdkCursor *cursor;
-        GdkColor   useless;
-        char       invisible_cursor_bits [] = { 0x0 };
-
-        useless.red = useless.green = useless.blue = 0;
-        useless.pixel = 0;
-
-        empty_bitmap = gdk_bitmap_create_from_data (NULL,
-                                                    invisible_cursor_bits,
-                                                    1, 1);
-
-        cursor = gdk_cursor_new_from_pixmap (empty_bitmap,
-                                             empty_bitmap,
-                                             &useless,
-                                             &useless, 0, 0);
-
-        g_object_unref (empty_bitmap);
-
-        return cursor;
-}
-
 static const char *
 grab_string (int status)
 {
@@ -120,7 +95,7 @@ xorg_lock_smasher_set_active (GSGrab  *grab,
 {
         int status, event, error;
 
-	if (!XF86MiscQueryExtension (GDK_DISPLAY (), &event, &error)) {
+	if (!XF86MiscQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &event, &error)) {
 		gs_debug ("No XFree86-Misc extension present");
 		return;
 	}
@@ -133,7 +108,7 @@ xorg_lock_smasher_set_active (GSGrab  *grab,
 
         gdk_error_trap_push ();
 
-        status = XF86MiscSetGrabKeysState (GDK_DISPLAY (), active);
+        status = XF86MiscSetGrabKeysState (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), active);
 
         gdk_display_sync (gdk_display_get_default ());
         gdk_error_trap_pop ();
@@ -201,7 +176,7 @@ gs_grab_get_mouse (GSGrab    *grab,
         g_return_val_if_fail (window != NULL, FALSE);
         g_return_val_if_fail (screen != NULL, FALSE);
 
-        cursor = get_cursor ();
+        cursor = gdk_cursor_new (GDK_BLANK_CURSOR);
 
         gs_debug ("Grabbing mouse widget=%X", (guint32) GDK_WINDOW_XID (window));
         status = gdk_pointer_grab (window, TRUE, 0, NULL,
@@ -404,9 +379,9 @@ gs_grab_nuke_focus (void)
 
         gdk_error_trap_push ();
 
-        XGetInputFocus (GDK_DISPLAY (), &focus, &rev);
+        XGetInputFocus (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &focus, &rev);
 
-        XSetInputFocus (GDK_DISPLAY (), None, RevertToNone, CurrentTime);
+        XSetInputFocus (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), None, RevertToNone, CurrentTime);
 
         gdk_display_sync (gdk_display_get_default ());
         gdk_error_trap_pop ();
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
index c7dd28c..080ab91 100644
--- a/src/gs-lock-plug.c
+++ b/src/gs-lock-plug.c
@@ -1038,7 +1038,7 @@ gs_lock_plug_class_init (GSLockPlugClass *klass)
 
         binding_set = gtk_binding_set_by_class (klass);
 
-        gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
+        gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0,
                                       "close", 0);
 }
 
@@ -1585,7 +1585,7 @@ gs_lock_plug_init (GSLockPlug *plug)
         if (plug->priv->auth_prompt_kbd_layout_indicator != NULL) {
                 XklEngine *engine;
 
-                engine = xkl_engine_get_instance (GDK_DISPLAY ());
+                engine = xkl_engine_get_instance (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
                 if (xkl_engine_get_num_groups (engine) > 1) {
                         GtkWidget *layout_indicator;
 
diff --git a/src/gs-watcher-x11.c b/src/gs-watcher-x11.c
index ec63552..f3d611d 100644
--- a/src/gs-watcher-x11.c
+++ b/src/gs-watcher-x11.c
@@ -535,7 +535,7 @@ disable_builtin_screensaver (GSWatcher *watcher,
         int desired_server_timeout, desired_server_interval;
         int desired_prefer_blank,   desired_allow_exp;
 
-        XGetScreenSaver (GDK_DISPLAY (),
+        XGetScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
                          &current_server_timeout,
                          &current_server_interval,
                          &current_prefer_blank,
@@ -573,18 +573,18 @@ disable_builtin_screensaver (GSWatcher *watcher,
                           (desired_prefer_blank ? "blank" : "noblank"),
                           (desired_allow_exp ? "expose" : "noexpose"));
 
-                XSetScreenSaver (GDK_DISPLAY (),
+                XSetScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
                                  desired_server_timeout,
                                  desired_server_interval,
                                  desired_prefer_blank,
                                  desired_allow_exp);
 
-                XSync (GDK_DISPLAY (), FALSE);
+                XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE);
         }
 
         if (unblank_screen) {
                 /* Turn off the server builtin saver if it is now running. */
-                XForceScreenSaver (GDK_DISPLAY (), ScreenSaverReset);
+                XForceScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), ScreenSaverReset);
         }
 }
 
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index fce98d9..519c786 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -144,25 +144,10 @@ static void
 set_invisible_cursor (GdkWindow *window,
                       gboolean   invisible)
 {
-        GdkBitmap *empty_bitmap;
         GdkCursor *cursor = NULL;
-        GdkColor   useless;
-        char       invisible_cursor_bits [] = { 0x0 };
 
         if (invisible) {
-                useless.red = useless.green = useless.blue = 0;
-                useless.pixel = 0;
-
-                empty_bitmap = gdk_bitmap_create_from_data (window,
-                                                            invisible_cursor_bits,
-                                                            1, 1);
-
-                cursor = gdk_cursor_new_from_pixmap (empty_bitmap,
-                                                     empty_bitmap,
-                                                     &useless,
-                                                     &useless, 0, 0);
-
-                g_object_unref (empty_bitmap);
+                cursor = gdk_cursor_new (GDK_BLANK_CURSOR);
         }
 
         gdk_window_set_cursor (window, cursor);
@@ -231,7 +216,7 @@ clear_children (Window window)
         int               status;
 
         children = NULL;
-        status = XQueryTree (GDK_DISPLAY (), window, &root, &parent, &children, &n_children);
+        status = XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), window, &root, &parent, &children, &n_children);
 
         if (status == 0) {
                 if (children) {
@@ -246,7 +231,7 @@ clear_children (Window window)
 
                         child = children [--n_children];
 
-                        XClearWindow (GDK_DISPLAY (), child);
+                        XClearWindow (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), child);
                         clear_children (child);
                 }
 
@@ -396,19 +381,19 @@ gs_window_clear (GSWindow *window)
         clear_widget (window->priv->drawing_area);
 }
 
-static GdkRegion *
+static cairo_region_t *
 get_outside_region (GSWindow *window)
 {
-        int        i;
-        GdkRegion *region;
+        int             i;
+        cairo_region_t *region;
 
-        region = gdk_region_new ();
+        region = cairo_region_create ();
         for (i = 0; i < window->priv->monitor; i++) {
                 GdkRectangle geometry;
 
                 gdk_screen_get_monitor_geometry (gtk_window_get_screen (GTK_WINDOW (window)),
                                                    i, &geometry);
-                gdk_region_union_with_rect (region, &geometry);
+                cairo_region_union_rectangle (region, (const cairo_rectangle_int_t *)&geometry);
         }
 
         return region;
@@ -417,9 +402,9 @@ get_outside_region (GSWindow *window)
 static void
 update_geometry (GSWindow *window)
 {
-        GdkRectangle geometry;
-        GdkRegion   *outside_region;
-        GdkRegion   *monitor_region;
+        GdkRectangle    geometry;
+        cairo_region_t *outside_region;
+        cairo_region_t *monitor_region;
 
         outside_region = get_outside_region (window);
 
@@ -432,12 +417,12 @@ update_geometry (GSWindow *window)
                   geometry.y,
                   geometry.width,
                   geometry.height);
-        monitor_region = gdk_region_rectangle (&geometry);
-        gdk_region_subtract (monitor_region, outside_region);
-        gdk_region_destroy (outside_region);
+        monitor_region = cairo_region_create_rectangle ((const cairo_rectangle_int_t *)&geometry);
+        cairo_region_subtract (monitor_region, outside_region);
+        cairo_region_destroy (outside_region);
 
-        gdk_region_get_clipbox (monitor_region, &geometry);
-        gdk_region_destroy (monitor_region);
+        cairo_region_get_extents (monitor_region, (cairo_rectangle_int_t *)&geometry);
+        cairo_region_destroy (monitor_region);
 
         gs_debug ("using geometry for monitor %d: x=%d y=%d w=%d h=%d",
                   window->priv->monitor,
@@ -853,10 +838,10 @@ select_popup_events (void)
         gdk_error_trap_push ();
 
         memset (&attr, 0, sizeof (attr));
-        XGetWindowAttributes (GDK_DISPLAY (), GDK_ROOT_WINDOW (), &attr);
+        XGetWindowAttributes (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), GDK_ROOT_WINDOW (), &attr);
 
         events = SubstructureNotifyMask | attr.your_event_mask;
-        XSelectInput (GDK_DISPLAY (), GDK_ROOT_WINDOW (), events);
+        XSelectInput (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), GDK_ROOT_WINDOW (), events);
 
         gdk_display_sync (gdk_display_get_default ());
         gdk_error_trap_pop ();
@@ -871,9 +856,9 @@ window_select_shape_events (GSWindow *window)
 
         gdk_error_trap_push ();
 
-        if (XShapeQueryExtension (GDK_DISPLAY (), &window->priv->shape_event_base, &shape_error_base)) {
+        if (XShapeQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &window->priv->shape_event_base, &shape_error_base)) {
                 events = ShapeNotifyMask;
-                XShapeSelectInput (GDK_DISPLAY (), GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window))), events);
+                XShapeSelectInput (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window))), events);
         }
 
         gdk_display_sync (gdk_display_get_default ());
@@ -2019,10 +2004,10 @@ queue_key_event (GSWindow    *window,
 {
         /* Eat the first return, enter, escape, or space */
         if (window->priv->key_events == NULL
-            && (event->keyval == GDK_Return
-                || event->keyval == GDK_KP_Enter
-                || event->keyval == GDK_Escape
-                || event->keyval == GDK_space)) {
+            && (event->keyval == GDK_KEY_Return
+                || event->keyval == GDK_KEY_KP_Enter
+                || event->keyval == GDK_KEY_Escape
+                || event->keyval == GDK_KEY_space)) {
                 return;
         }
 
@@ -2030,9 +2015,9 @@ queue_key_event (GSWindow    *window,
            something is wrong */
         /* Don't queue keys that may cause focus navigation in the dialog */
         if (g_list_length (window->priv->key_events) < MAX_QUEUED_EVENTS
-            && event->keyval != GDK_Tab
-            && event->keyval != GDK_Up
-            && event->keyval != GDK_Down) {
+            && event->keyval != GDK_KEY_Tab
+            && event->keyval != GDK_KEY_Up
+            && event->keyval != GDK_KEY_Down) {
                 window->priv->key_events = g_list_prepend (window->priv->key_events,
                                                            gdk_event_copy ((GdkEvent *)event));
         }
diff --git a/src/test-fade.c b/src/test-fade.c
index d5ae0a6..0982c29 100644
--- a/src/test-fade.c
+++ b/src/test-fade.c
@@ -97,14 +97,14 @@ main (int    argc,
                 exit (1);
         }
 
-        if (! XQueryExtension (GDK_DISPLAY (), XF86_VIDMODE_NAME, &op, &event, &err)) {
+        if (! XQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), XF86_VIDMODE_NAME, &op, &event, &err)) {
                 g_message ("no " XF86_VIDMODE_NAME " extension");
         } else {
 # ifdef HAVE_XF86VMODE_GAMMA
                 int major;
                 int minor;
 
-                if (! XF86VidModeQueryVersion (GDK_DISPLAY (), &major, &minor)) {
+                if (! XF86VidModeQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor)) {
                         g_message ("unable to get " XF86_VIDMODE_NAME " version");
                 } else {
                         g_message (XF86_VIDMODE_NAME " version %d.%d", major, minor);
