diff --git a/configure.in b/configure.in
index e97abcf..4249fea 100644
--- a/configure.in
+++ b/configure.in
@@ -41,18 +41,18 @@ SOUP_VERSION=2.24.0
 TELEPATHY_GLIB_VERSION=0.11.6
 NETWORKMANAGER_VERSION=0.7
 
-PKG_CHECK_MODULES(VINO_SERVER, glib-2.0 >= $GLIB_VERSION gtk+-x11-2.0 >= $GTK_VERSION gconf-2.0 dbus-1 >= $DBUS_VERSION dbus-glib-1)
+PKG_CHECK_MODULES(VINO_SERVER, glib-2.0 >= $GLIB_VERSION gtk+-x11-3.0 >= $GTK_VERSION gconf-2.0 dbus-1 >= $DBUS_VERSION dbus-glib-1)
 
-PKG_CHECK_MODULES(VINO_CAPPLET, glib-2.0 >= $GLIB_VERSION gtk+-2.0 >= $GTK_VERSION gconf-2.0 dbus-1 >= $DBUS_VERSION dbus-glib-1 libsoup-2.4 >= $SOUP_VERSION)
+PKG_CHECK_MODULES(VINO_CAPPLET, glib-2.0 >= $GLIB_VERSION gtk+-3.0 >= $GTK_VERSION gconf-2.0 dbus-1 >= $DBUS_VERSION dbus-glib-1 libsoup-2.4 >= $SOUP_VERSION)
 
 PKG_CHECK_MODULES(VINO_TOOLS, glib-2.0 >= $GLIB_VERSION gconf-2.0 gobject-2.0 >= $GLIB_VERSION gnome-keyring-1)
 
 # EGG stuff
-PKG_CHECK_MODULES(EGG, gtk+-2.0 >= $GTK_VERSION)
+PKG_CHECK_MODULES(EGG, gtk+-3.0 >= $GTK_VERSION)
 AC_SUBST(EGG_LIBS)
 AC_SUBST(EGG_CFLAGS)
 
-PKG_CHECK_MODULES(EGG_SMCLIENT, gtk+-2.0)
+PKG_CHECK_MODULES(EGG_SMCLIENT, gtk+-3.0)
 AC_SUBST(EGG_SMCLIENT_LIBS)
 AC_SUBST(EGG_SMCLIENT_CFLAGS)
 
diff --git a/server/vino-fb.c b/server/vino-fb.c
index 8d3bf64..d60e5aa 100644
--- a/server/vino-fb.c
+++ b/server/vino-fb.c
@@ -74,12 +74,12 @@ struct _VinoFBPrivate
   XImage          *tile;
   XShmSegmentInfo  tile_x_shm_info;
 
-  GdkRegion       *damage_region;
+  cairo_region_t  *damage_region;
 
   guint            update_timeout;
 
 #ifdef HAVE_XDAMAGE
-  GdkRegion       *pending_damage;
+  cairo_region_t  *pending_damage;
   guint            damage_idle_handler;
 
   Damage           xdamage;
@@ -390,7 +390,7 @@ vino_fb_poll_scanline (VinoFB *vfb,
 
       if (memcmp (dest, src, width * bytes_per_pixel) != 0)
 	{
-	  GdkRectangle rect;
+	  cairo_rectangle_int_t rect;
 
 	  rect.x = x;
 	  rect.y = line - (line % TILE_HEIGHT);
@@ -402,9 +402,9 @@ vino_fb_poll_scanline (VinoFB *vfb,
 	  if (vino_fb_copy_tile (vfb, &rect))
 	    {
 	      if (!vfb->priv->damage_region)
-		vfb->priv->damage_region = gdk_region_rectangle (&rect);
+		vfb->priv->damage_region = cairo_region_create_rectangle (&rect);
 	      else
-		gdk_region_union_with_rect (vfb->priv->damage_region, &rect);
+	        cairo_region_union_rectangle (vfb->priv->damage_region, &rect);
 	    }
 
 	  retval = TRUE;
@@ -461,7 +461,7 @@ vino_fb_finalize_xdamage (VinoFB *vfb)
   vfb->priv->damage_idle_handler = 0;
 
   if (vfb->priv->pending_damage)
-    gdk_region_destroy (vfb->priv->pending_damage);
+    cairo_region_destroy (vfb->priv->pending_damage);
   vfb->priv->pending_damage = NULL;
 
   if (vfb->priv->fb_pixmap)
@@ -515,7 +515,7 @@ static void
 vino_fb_finalize_screen_data (VinoFB *vfb)
 {
   if (vfb->priv->damage_region)
-    gdk_region_destroy (vfb->priv->damage_region);
+    cairo_region_destroy (vfb->priv->damage_region);
   vfb->priv->damage_region = NULL;
 
   if (vfb->priv->use_xdamage)
@@ -554,14 +554,14 @@ vino_fb_screen_size_changed (VinoFB    *vfb,
 static gboolean
 vino_fb_xdamage_idle_handler (VinoFB *vfb)
 {
-  GdkRectangle *damage = NULL;
+  cairo_rectangle_int_t *damage, d;
   XRectangle    xdamage;
-  int           n_rects;
   int           error;
 
-  g_assert (!gdk_region_empty (vfb->priv->pending_damage));
+  g_assert (!cairo_region_is_empty (vfb->priv->pending_damage));
 
-  gdk_region_get_rectangles (vfb->priv->pending_damage, &damage, &n_rects);
+  cairo_region_get_rectangle (vfb->priv->pending_damage, 0, &d);
+  damage = &d;
 
   xdamage.x      = damage->x;
   xdamage.y      = damage->y;
@@ -632,24 +632,16 @@ vino_fb_xdamage_idle_handler (VinoFB *vfb)
 
   /* add damage to our region */
   if (vfb->priv->damage_region)
-    gdk_region_union_with_rect (vfb->priv->damage_region, damage);
+    cairo_region_union_rectangle (vfb->priv->damage_region, damage);
   else
-    vfb->priv->damage_region = gdk_region_rectangle (damage);
+    vfb->priv->damage_region = cairo_region_create_rectangle (damage);
 
   emit_damage_notify (vfb);
 
  out:
-  {
-    GdkRegion *tmp;
+  cairo_region_subtract_rectangle (vfb->priv->pending_damage, damage);
 
-    tmp = gdk_region_rectangle (damage);
-    gdk_region_subtract (vfb->priv->pending_damage, tmp);
-    gdk_region_destroy (tmp);
-  }
-
-  g_free (damage);
-
-  if (gdk_region_empty (vfb->priv->pending_damage))
+  if (cairo_region_is_empty (vfb->priv->pending_damage))
     {
       vfb->priv->damage_idle_handler = 0;
       return FALSE;
@@ -665,7 +657,7 @@ vino_fb_xdamage_event_filter (GdkXEvent *xevent,
 {
   XEvent             *xev = (XEvent *) xevent;
   XDamageNotifyEvent *notify;
-  GdkRectangle        damage;
+  cairo_rectangle_int_t damage;
 
   if (xev->type != vfb->priv->xdamage_notify_event)
     return GDK_FILTER_CONTINUE;
@@ -681,7 +673,7 @@ vino_fb_xdamage_event_filter (GdkXEvent *xevent,
 	   damage.x, damage.y, damage.width, damage.height,
 	   notify->more ? "(true)" : "(false)", notify->level);
 
-  gdk_region_union_with_rect (vfb->priv->pending_damage, &damage);
+  cairo_region_union_rectangle (vfb->priv->pending_damage, &damage);
 
   if (!vfb->priv->damage_idle_handler)
     vfb->priv->damage_idle_handler =
@@ -740,7 +732,7 @@ vino_fb_init_xdamage (VinoFB *vfb)
 			 (GdkFilterFunc) vino_fb_xdamage_event_filter,
 			 vfb);
 
-  vfb->priv->pending_damage = gdk_region_new ();
+  vfb->priv->pending_damage = cairo_region_create ();
 
   vfb->priv->use_xdamage = TRUE;
 #endif
@@ -1177,17 +1169,17 @@ vino_fb_get_color_masks (VinoFB *vfb,
 
 static inline void
 vino_fb_debug_dump_damage (VinoFB       *vfb,
-			   GdkRectangle *rects,
+			   cairo_rectangle_int_t *rects,
 			   int           n_rects)
 {
 #ifdef GNOME_ENABLE_DEBUG
   if (_vino_debug_flags & VINO_DEBUG_POLLING)
     {
-      GdkRectangle clipbox;
+      cairo_rectangle_int_t clipbox;
       int          area;
       int          i;
 
-      gdk_region_get_clipbox (vfb->priv->damage_region, &clipbox);
+      cairo_region_get_extents (vfb->priv->damage_region, &clipbox);
 
       fprintf (stderr, "Dump of damage region: clipbox (%d, %d) (%d x %d)\n",
 	       clipbox.x, clipbox.y, clipbox.width, clipbox.height);
@@ -1207,13 +1199,14 @@ vino_fb_debug_dump_damage (VinoFB       *vfb,
 #endif
 }
 
-GdkRectangle *
+cairo_rectangle_int_t *
 vino_fb_get_damage (VinoFB   *vfb,
 		    int      *n_rects,
 		    gboolean  clear_damage)
 
 {
-  GdkRectangle *retval;
+  cairo_rectangle_int_t *retval;
+  int i;
 
   g_return_val_if_fail (VINO_IS_FB (vfb), NULL);
   g_return_val_if_fail (n_rects != NULL, NULL);
@@ -1224,15 +1217,20 @@ vino_fb_get_damage (VinoFB   *vfb,
       return NULL;
     }
 
-  retval = NULL;
-  *n_rects = 0;
-  gdk_region_get_rectangles (vfb->priv->damage_region, &retval, n_rects);
+  *n_rects = cairo_region_num_rectangles (vfb->priv->damage_region);
+  retval = g_malloc_n (sizeof (cairo_rectangle_int_t), *n_rects);
+
+  for (i=0; i < *n_rects; i++)
+    {
+      cairo_region_get_rectangle (vfb->priv->damage_region, i,
+                                  &retval[i]);
+    }
 
   vino_fb_debug_dump_damage (vfb, retval, *n_rects);
  
   if (clear_damage)
     {
-      gdk_region_destroy (vfb->priv->damage_region);
+      cairo_region_destroy (vfb->priv->damage_region);
       vfb->priv->damage_region = NULL;
     }
 
diff --git a/server/vino-fb.h b/server/vino-fb.h
index 149ebee..70f9664 100644
--- a/server/vino-fb.h
+++ b/server/vino-fb.h
@@ -25,6 +25,7 @@
 
 #include <glib-object.h>
 #include <gdk/gdk.h>
+#include <cairo/cairo.h>
 
 G_BEGIN_DECLS
 
@@ -71,9 +72,9 @@ void          vino_fb_get_color_masks    (VinoFB    *vfb,
 					  gulong    *green_mask,
 					  gulong    *blue_mask);
 
-GdkRectangle *vino_fb_get_damage         (VinoFB    *vfb,
-					  int       *n_rects,
-					  gboolean   clear_damage);
+cairo_rectangle_int_t *vino_fb_get_damage         (VinoFB    *vfb,
+						  int       *n_rects,
+						  gboolean   clear_damage);
 
 G_END_DECLS
 
diff --git a/server/vino-server.c b/server/vino-server.c
index 04ebb05..4783f5d 100644
--- a/server/vino-server.c
+++ b/server/vino-server.c
@@ -801,7 +801,7 @@ vino_server_check_vnc_password (rfbClientPtr  rfb_client,
 static void
 vino_server_handle_damage_notify (VinoServer *server)
 {
-  GdkRectangle *rects;
+  cairo_rectangle_int_t *rects;
   int           i, n_rects;
 
   g_return_if_fail (VINO_IS_SERVER (server));
