[Spice-commits] 7 commits - configure.ac doc/reference Makefile.am spice-client-gtk-2.0.pc.in src/channel-display.c src/channel-display-priv.h src/gtk-compat.h src/Makefile.am src/spice-grabsequence.c src/spice-grabsequence.h src/spice-grabsequence-priv.h src/spice-gtk-session.h src/spice-gtk-session-priv.h src/spice-widget.c src/spice-widget-cairo.c src/spice-widget.h src/spice-widget-priv.h src/spice-widget-x11.c src/usb-device-widget.c src/usb-device-widget.h vapi/Makefile.am

Marc-André Lureau elmarco at kemper.freedesktop.org
Mon Mar 14 11:24:22 UTC 2016


 Makefile.am                   |    2 
 configure.ac                  |  124 ------------------
 doc/reference/Makefile.am     |    2 
 spice-client-gtk-2.0.pc.in    |   12 -
 src/Makefile.am               |   76 -----------
 src/channel-display-priv.h    |    1 
 src/channel-display.c         |   41 ------
 src/gtk-compat.h              |   24 ---
 src/spice-grabsequence-priv.h |   28 ++++
 src/spice-grabsequence.c      |    1 
 src/spice-grabsequence.h      |   13 -
 src/spice-gtk-session-priv.h  |   13 +
 src/spice-gtk-session.h       |   33 ----
 src/spice-widget-cairo.c      |   20 ---
 src/spice-widget-priv.h       |   35 ++---
 src/spice-widget-x11.c        |  280 ------------------------------------------
 src/spice-widget.c            |  102 ---------------
 src/spice-widget.h            |   42 ------
 src/usb-device-widget.c       |   16 ++
 src/usb-device-widget.h       |   36 -----
 vapi/Makefile.am              |   11 -
 21 files changed, 96 insertions(+), 816 deletions(-)

New commits:
commit 70a00b8fcc2ca85d3601f6ac4895f906f9032e77
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Thu Dec 17 00:22:31 2015 +0100

    gtk: drop deprecated stuff from spice-gtk
    
    Breaking ABI is a good time to remove deprecated code.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Acked-by: Fabiano Fidêncio <fidencio at redhat.com>

diff --git a/src/spice-widget.c b/src/spice-widget.c
index 3e7a731..1225f5f 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -81,7 +81,6 @@ enum {
     PROP_KEYBOARD_GRAB,
     PROP_MOUSE_GRAB,
     PROP_RESIZE_GUEST,
-    PROP_AUTO_CLIPBOARD,
     PROP_SCALING,
     PROP_ONLY_DOWNSCALE,
     PROP_DISABLE_INPUTS,
@@ -128,7 +127,6 @@ static void spice_display_get_property(GObject    *object,
 {
     SpiceDisplay *display = SPICE_DISPLAY(object);
     SpiceDisplayPrivate *d = display->priv;
-    gboolean boolean;
 
     switch (prop_id) {
     case PROP_SESSION:
@@ -149,10 +147,6 @@ static void spice_display_get_property(GObject    *object,
     case PROP_RESIZE_GUEST:
         g_value_set_boolean(value, d->resize_guest_enable);
         break;
-    case PROP_AUTO_CLIPBOARD:
-        g_object_get(d->gtk_session, "auto-clipboard", &boolean, NULL);
-        g_value_set_boolean(value, boolean);
-        break;
     case PROP_SCALING:
         g_value_set_boolean(value, d->allow_scaling);
         break;
@@ -368,10 +362,6 @@ static void spice_display_set_property(GObject      *object,
         d->only_downscale = g_value_get_boolean(value);
         scaling_updated(display);
         break;
-    case PROP_AUTO_CLIPBOARD:
-        g_object_set(d->gtk_session, "auto-clipboard",
-                     g_value_get_boolean(value), NULL);
-        break;
     case PROP_DISABLE_INPUTS:
         d->disable_inputs = g_value_get_boolean(value);
         gtk_widget_set_can_focus(GTK_WIDGET(display), !d->disable_inputs);
@@ -1930,25 +1920,6 @@ static void spice_display_class_init(SpiceDisplayClass *klass)
                               G_PARAM_READABLE |
                               G_PARAM_STATIC_STRINGS));
 
-    /**
-     * SpiceDisplay:auto-clipboard:
-     *
-     * When this is true the clipboard gets automatically shared between host
-     * and guest.
-     *
-     * Deprecated: 0.8: Use SpiceGtkSession:auto-clipboard property instead
-     **/
-    g_object_class_install_property
-        (gobject_class, PROP_AUTO_CLIPBOARD,
-         g_param_spec_boolean("auto-clipboard",
-                              "Auto clipboard",
-                              "Automatically relay clipboard changes between "
-                              "host and guest.",
-                              TRUE,
-                              G_PARAM_READWRITE |
-                              G_PARAM_STATIC_STRINGS |
-                              G_PARAM_DEPRECATED));
-
     g_object_class_install_property
         (gobject_class, PROP_SCALING,
          g_param_spec_boolean("scaling", "Scaling",
@@ -2640,48 +2611,6 @@ void spice_display_mouse_ungrab(SpiceDisplay *display)
 }
 
 /**
- * spice_display_copy_to_guest:
- * @display: a #SpiceDisplay
- *
- * Copy client-side clipboard to guest clipboard.
- *
- * Deprecated: 0.8: Use spice_gtk_session_copy_to_guest() instead
- **/
-void spice_display_copy_to_guest(SpiceDisplay *display)
-{
-    SpiceDisplayPrivate *d;
-
-    g_return_if_fail(SPICE_IS_DISPLAY(display));
-
-    d = display->priv;
-
-    g_return_if_fail(d->gtk_session != NULL);
-
-    spice_gtk_session_copy_to_guest(d->gtk_session);
-}
-
-/**
- * spice_display_paste_from_guest:
- * @display: a #SpiceDisplay
- *
- * Copy guest clipboard to client-side clipboard.
- *
- * Deprecated: 0.8: Use spice_gtk_session_paste_from_guest() instead
- **/
-void spice_display_paste_from_guest(SpiceDisplay *display)
-{
-    SpiceDisplayPrivate *d;
-
-    g_return_if_fail(SPICE_IS_DISPLAY(display));
-
-    d = display->priv;
-
-    g_return_if_fail(d->gtk_session != NULL);
-
-    spice_gtk_session_paste_from_guest(d->gtk_session);
-}
-
-/**
  * spice_display_get_pixbuf:
  * @display: a #SpiceDisplay
  *
diff --git a/src/spice-widget.h b/src/spice-widget.h
index 5a7c206..a8adf9c 100644
--- a/src/spice-widget.h
+++ b/src/spice-widget.h
@@ -70,13 +70,6 @@ void spice_display_send_keys(SpiceDisplay *display, const guint *keyvals,
                              int nkeyvals, SpiceDisplayKeyEvent kind);
 GdkPixbuf *spice_display_get_pixbuf(SpiceDisplay *display);
 
-#ifndef SPICE_DISABLE_DEPRECATED
-SPICE_DEPRECATED_FOR(spice_gtk_session_copy_to_guest)
-void spice_display_copy_to_guest(SpiceDisplay *display);
-SPICE_DEPRECATED_FOR(spice_gtk_session_paste_from_guest)
-void spice_display_paste_from_guest(SpiceDisplay *display);
-#endif
-
 G_END_DECLS
 
 #endif /* __SPICE_CLIENT_WIDGET_H__ */
commit 0917002c48a0a5deb615d120a0e5997eefc89fd4
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Wed Dec 16 17:36:02 2015 +0100

    Drop GTK+ 2.0
    
    Not so many systems require gtk+ 2.0 these days, let's move on.
    
    This drops the old python bindings (non-gir based), and the
    unsteady/experimental gtk2-only XShm support.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Acked-by: Fabiano Fidêncio <fidencio at redhat.com>

diff --git a/Makefile.am b/Makefile.am
index 3d7a174..47cf840 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,7 +19,7 @@ pkgconfig_DATA =					\
 	$(NULL)
 
 if WITH_GTK
-pkgconfig_DATA += spice-client-gtk-$(SPICE_GTK_API_VERSION).pc
+pkgconfig_DATA += spice-client-gtk-3.0.pc
 endif
 
 if WITH_CONTROLLER
diff --git a/configure.ac b/configure.ac
index 4168290..5cba2ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,6 @@ esac
 AC_MSG_RESULT([$os_win32])
 AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
 
-AC_CHECK_HEADERS([sys/ipc.h sys/shm.h])
 AC_CHECK_HEADERS([sys/socket.h netinet/in.h arpa/inet.h])
 AC_CHECK_HEADERS([termios.h])
 
@@ -115,44 +114,30 @@ SPICE_CHECK_SASL
 
 AC_MSG_CHECKING([which gtk+ version to compile against])
 AC_ARG_WITH([gtk],
-  [AS_HELP_STRING([--with-gtk=@<:@2.0/3.0/no@:>@],[which gtk+ version to compile against @<:@default=3.0@:>@])],
+  [AS_HELP_STRING([--with-gtk=@<:@3.0/no@:>@],[which gtk+ version to compile against @<:@default=3.0@:>@])],
   [case "$with_gtk" in
-     2.0|3.0) AC_MSG_RESULT([$with_gtk]) ;;
+     3.0) AC_MSG_RESULT([$with_gtk]) ;;
      no) AC_MSG_RESULT([none]) ;;
      *) AC_MSG_ERROR([invalid gtk version specified]) ;;
    esac],
   [with_gtk=3.0])
 
 case "$with_gtk" in
-  2.0) GTK_API_VERSION=2.0
-       GTK_REQUIRED=2.18.0
-       SPICE_GTK_API_VERSION=2.0
-       ;;
-  3.0) GTK_API_VERSION=3.0
-       GTK_REQUIRED=2.91.3
-       SPICE_GTK_API_VERSION=3.0
+  3.0) GTK_REQUIRED=2.91.3
        ;;
   no)
        AS_IF([test x$enable_gtk_doc = xyes],
              [AC_MSG_ERROR([Without GTK+, gtk-doc must be disabled])])
 esac
 
-AC_SUBST([GTK_API_VERSION])
 AC_SUBST([GTK_REQUIRED])
-AC_SUBST([SPICE_GTK_API_VERSION])
 AM_CONDITIONAL([WITH_GTK],[test "$with_gtk" != "no"])
-AM_CONDITIONAL([HAVE_GTK_2],[test "$with_gtk" = "2.0"])
-AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk" = "3.0"])
 
 AS_IF([test "x$with_gtk" != "xno"],
-      [PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED)])
+      [PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQUIRED)])
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
-SPICE_GTK_REQUIRES="${SPICE_GTK_REQUIRES} gtk+-$GTK_API_VERSION >= $GTK_REQUIRED"
-
-PKG_CHECK_EXISTS([gtk+-x11-$with_gtk], [have_x11=yes], [have_x11=no])
-AS_IF([test "x$have_x11" = "xyes"], [AC_DEFINE([HAVE_X11], 1, [Have x11?])])
-AM_CONDITIONAL([WITH_DISPLAY_X11], [test "x$have_x11" = "xyes"])
+SPICE_GTK_REQUIRES="${SPICE_GTK_REQUIRES} gtk+-3.0 >= $GTK_REQUIRED"
 
 PKG_CHECK_EXISTS([gtk+-quartz-$with_gtk], [have_quartz=yes], [have_quartz=no])
 AS_IF([test "x$have_quartz" = "xyes"], [AC_DEFINE([HAVE_QUARTZ], 1, [Have Quartz?])])
@@ -162,27 +147,7 @@ PKG_CHECK_EXISTS([gtk+-win32-$with_gtk], [have_win32=yes], [have_win32=no])
 AS_IF([test "x$have_win32" = "xyes"], [AC_DEFINE([HAVE_WINDOWS], 1, [Have Win32?])])
 AM_CONDITIONAL([WITH_DISPLAY_WINDOWS], [test "x$have_win32" = "xyes"])
 
-if [test "x$have_x11" = "xyes" ]
-then
-  AC_CHECK_HEADERS([X11/XKBlib.h])
-fi
-
-AC_ARG_WITH([x11],
-  AS_HELP_STRING([--with-x11], [Use x11/shm display backend instead of cairo @<:@default=no@:>@]))
-
-AC_MSG_CHECKING([What rendering backend to use..])
-if [test "x$with_x11" = "xyes" ]
-then
-  if [test "$GTK_API_VERSION" = "3.0" ]
-  then
-    AC_MSG_ERROR([X11 SHM backend is not compatible with GTK3])
-  fi
-  AC_MSG_RESULT([x11])
-  AC_DEFINE([WITH_X11], 1, [Use X11 backend?])
-else
-  AC_MSG_RESULT([cairo])
-fi
-AM_CONDITIONAL([WITH_X11], [test "x$with_x11" = "xyes"])
+AC_CHECK_HEADERS([X11/XKBlib.h])
 
 AC_ARG_WITH([pnp-ids-path],
   AC_HELP_STRING([--with-pnp-ids-path],
@@ -567,82 +532,6 @@ AM_CONDITIONAL(WITH_VALA, [test "x$enable_vala" = "xyes"])
 VAPIDIR="${datadir}/vala/vapi"
 AC_SUBST(VAPIDIR)
 
-
-AC_ARG_WITH([python],
-  AS_HELP_STRING([--with-python], [build python bindings @<:@default=auto@:>@]),
-  [case "$withval" in
-   yes|no|auto) with_python="$withval";;
-   *) AC_MSG_ERROR([bad value $withval for python option]) ;;
-   esac],
-  [AS_IF([test "$with_gtk" != "2.0" || test "x$os_win32" = "xyes"],
-         [with_python=no],[with_python=auto])]
-)
-
-if test "x$with_python" != "xno"; then
-  PKG_CHECK_MODULES(PYGTK, [pygtk-2.0 >= 2.0.0], [have_pygtk=yes], [have_pygtk=no])
-  AC_SUBST(PYGTK_CFLAGS)
-  AC_SUBST(PYGTK_LIBS)
-  if test "x$have_pygtk" != "xyes"
-  then
-    if test "x$with_python" = "xyes"
-    then
-      AC_MSG_ERROR("No pygtk found")
-    else
-      with_python=no
-    fi
-  fi
-fi
-
-if test "x$with_python" != "xno"; then
-  AM_PATH_PYTHON([], [have_python=yes], [have_python=no])
-  if test "x$have_python" != "xyes"
-  then
-    if test "x$with_python" = "xyes"
-    then
-      AC_MSG_ERROR("No python found")
-    else
-      with_python=no
-    fi
-  fi
-fi
-
-if test "x$with_python" != "xno"; then
-  AC_MSG_CHECKING([whether $PYTHON version >= 2.0])
-  HAVE_PYTHON_REQUIRED=no
-  AM_PYTHON_CHECK_VERSION([$PYTHON], [2.0],
-      [HAVE_PYTHON_REQUIRED="yes"],
-      [HAVE_PYTHON_REQUIRED="no"])
-
-  AC_MSG_RESULT($HAVE_PYTHON_REQUIRED)
-
-  if test "x$HAVE_PYTHON_REQUIRED" != "xyes"
-  then
-    if test "x$with_python" = "xyes"
-    then
-      AC_MSG_ERROR("No suitable python found")
-    else
-      with_python=no
-    fi
-  fi
-fi
-
-if test "x$with_python" != "xno"; then
-  AM_CHECK_PYTHON_HEADERS(have_python_headers=yes,have_python_headers=no)
-
-  if test "x$have_python_headers" != "xyes"
-  then
-    if test "x$with_python" = "xyes"
-    then
-      AC_MSG_ERROR("No python development headers found")
-    else
-      with_python=no
-    fi
-  fi
-fi
-
-AM_CONDITIONAL(WITH_PYTHON, [test "x$with_python" != "xno"])
-
-
 AC_ARG_ENABLE([dbus],
   AS_HELP_STRING([--enable-dbus=@<:@auto/yes/no@:>@],
                  [Enable dbus support for desktop integration (disabling automount) @<:@default=auto@:>@]),
@@ -695,7 +584,6 @@ AM_CONDITIONAL([BUILD_TESTS], [test x"$enable_static" = xyes])
 AC_OUTPUT([
 Makefile
 spice-client-glib-2.0.pc
-spice-client-gtk-2.0.pc
 spice-client-gtk-3.0.pc
 spice-controller.pc
 data/Makefile
diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am
index 2d13863..b76a9cf 100644
--- a/doc/reference/Makefile.am
+++ b/doc/reference/Makefile.am
@@ -55,7 +55,7 @@ IGNORE_HFILES=					\
 
 # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
 GTKDOC_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/src -I$(top_builddir)/src $(SPICE_GLIB_CFLAGS) $(SPICE_GTK_CFLAGS) $(COMMON_CFLAGS) -DSPICE_COMPILATION
-GTKDOC_LIBS = $(top_builddir)/src/libspice-client-glib-2.0.la $(top_builddir)/src/libspice-client-gtk-$(SPICE_GTK_API_VERSION).la $(GTK_LIBS)
+GTKDOC_LIBS = $(top_builddir)/src/libspice-client-glib-2.0.la $(top_builddir)/src/libspice-client-gtk-3.0.la $(GTK_LIBS)
 
 include $(top_srcdir)/gtk-doc.make
 
diff --git a/spice-client-gtk-2.0.pc.in b/spice-client-gtk-2.0.pc.in
deleted file mode 100644
index a5b96e2..0000000
--- a/spice-client-gtk-2.0.pc.in
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: spice-client-gtk-2.0
-Description: SPICE Client Gtk 2.0 library
-Version: @VERSION@
-
-Requires: @SPICE_GTK_REQUIRES@ spice-client-glib-2.0
-Libs: -L${libdir} -lspice-client-gtk-2.0
-Cflags: -I${includedir}/spice-client-gtk-2.0
diff --git a/src/Makefile.am b/src/Makefile.am
index d6935cf..ffc98b9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -57,12 +57,8 @@ endif
 lib_LTLIBRARIES = libspice-client-glib-2.0.la
 
 if WITH_GTK
-if HAVE_GTK_2
-lib_LTLIBRARIES += libspice-client-gtk-2.0.la
-else
 lib_LTLIBRARIES += libspice-client-gtk-3.0.la
 endif
-endif
 
 if HAVE_LD_VERSION_SCRIPT
 GLIB_SYMBOLS_LDFLAGS = -Wl,--version-script=${srcdir}/map-file
@@ -151,15 +147,9 @@ nodist_SPICE_GTK_SOURCES_COMMON =	\
 	spice-marshal.c			\
 	$(NULL)
 
-if WITH_X11
-SPICE_GTK_SOURCES_COMMON +=		\
-	spice-widget-x11.c		\
-	$(NULL)
-else
 SPICE_GTK_SOURCES_COMMON +=		\
 	spice-widget-cairo.c		\
 	$(NULL)
-endif
 
 if WITH_GTK
 if WITH_EPOXY
@@ -168,23 +158,14 @@ SPICE_GTK_SOURCES_COMMON +=		\
 	$(NULL)
 endif
 
-if HAVE_GTK_2
-libspice_client_gtk_2_0_la_DEPEDENCIES = $(GTK_SYMBOLS_FILE)
-libspice_client_gtk_2_0_la_LDFLAGS = $(SPICE_GTK_LDFLAGS_COMMON)
-libspice_client_gtk_2_0_la_LIBADD = $(SPICE_GTK_LIBADD_COMMON)
-libspice_client_gtk_2_0_la_SOURCES = $(SPICE_GTK_SOURCES_COMMON)
-libspice_client_gtk_2_0_la_CFLAGS = $(EPOXY_CFLAGS)
-nodist_libspice_client_gtk_2_0_la_SOURCES = $(nodist_SPICE_GTK_SOURCES_COMMON)
-else
 libspice_client_gtk_3_0_la_DEPEDENCIES = $(GTK_SYMBOLS_FILE)
 libspice_client_gtk_3_0_la_LDFLAGS = $(SPICE_GTK_LDFLAGS_COMMON)
 libspice_client_gtk_3_0_la_LIBADD = $(SPICE_GTK_LIBADD_COMMON)
 libspice_client_gtk_3_0_la_SOURCES = $(SPICE_GTK_SOURCES_COMMON)
 libspice_client_gtk_3_0_la_CFLAGS = $(EPOXY_CFLAGS)
 nodist_libspice_client_gtk_3_0_la_SOURCES = $(nodist_SPICE_GTK_SOURCES_COMMON)
-endif
 
-libspice_client_gtkincludedir = $(includedir)/spice-client-gtk-$(SPICE_GTK_API_VERSION)
+libspice_client_gtkincludedir = $(includedir)/spice-client-gtk-3.0
 libspice_client_gtkinclude_HEADERS =	\
 	spice-client-gtk.h		\
 	spice-gtk-session.h		\
@@ -399,7 +380,7 @@ spicy_SOURCES =					\
 	$(NULL)
 
 spicy_LDADD =						\
-	libspice-client-gtk-$(SPICE_GTK_API_VERSION).la	\
+	libspice-client-gtk-3.0.la			\
 	libspice-client-glib-2.0.la			\
 	$(GTHREAD_LIBS)					\
 	$(GTK_LIBS)					\
@@ -470,12 +451,8 @@ spicy_stats_LDADD =				\
 $(libspice_client_glib_2_0_la_SOURCES): spice-glib-enums.h spice-marshal.h
 
 if WITH_GTK
-if HAVE_GTK_2
-$(libspice_client_gtk_2_0_la_SOURCES): spice-glib-enums.h spice-widget-enums.h
-else
 $(libspice_client_gtk_3_0_la_SOURCES): spice-glib-enums.h spice-widget-enums.h
 endif
-endif
 
 spice-marshal.c: spice-marshal.h
 spice-glib-enums.c: spice-glib-enums.h
@@ -576,40 +553,6 @@ vncdisplaykeymap_win322xtkbd.c:
 vncdisplaykeymap_x112xtkbd.c:
 	$(AM_V_GEN)$(KEYMAP_GEN) $(srcdir)/keymaps.csv x11 xtkbd > $@ || rm $@
 
-if WITH_PYTHON
-pyexec_LTLIBRARIES = SpiceClientGtk.la
-
-# workaround for broken parallel install support in automake with LTLIBRARIES
-# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328
-install_pyexecLTLIBRARIES = install-pyexecLTLIBRARIES
-$(install_pyexecLTLIBRARIES): install-libLTLIBRARIES
-
-SpiceClientGtk_la_LIBADD = libspice-client-gtk-2.0.la libspice-client-glib-2.0.la $(PYGTK_LIBS)
-SpiceClientGtk_la_CFLAGS = $(GTK_CFLAGS) $(PYTHON_INCLUDES) $(PYGTK_CFLAGS) $(WARN_PYFLAGS)
-SpiceClientGtk_la_LDFLAGS = -module -avoid-version -fPIC
-SpiceClientGtk_la_SOURCES = spice-client-gtk-module.c
-nodist_SpiceClientGtk_la_SOURCES = spice-client-gtk-module.defs.c
-
-CODEGENDIR = `pkg-config --variable=codegendir pygtk-2.0`
-DEFSDIR = `pkg-config --variable=defsdir pygtk-2.0`
-
-spice-client-gtk.defs: $(libspice_client_gtkinclude_HEADERS) $(nodist_libspice_client_gtkinclude_HEADERS) $(libspice_client_glibinclude_HEADERS) $(nodist_libspice_client_glibinclude_HEADERS)
-	$(AM_V_GEN)$(PYTHON) $(CODEGENDIR)/h2def.py \
-		-f $(srcdir)/spice-client-gtk-manual.defs \
-		$^ > $@
-
-spice-client-gtk-module.defs.c: spice-client-gtk.override spice-client-gtk.defs spice-client-gtk-manual.defs
-	@cat spice-client-gtk.defs $(srcdir)/spice-client-gtk-manual.defs > tmp.defs
-	$(AM_V_GEN)pygobject-codegen-2.0 --prefix spice \
-			  --register $(DEFSDIR)/gdk-types.defs \
-			  --register $(DEFSDIR)/gtk-types.defs \
-			  --override $(srcdir)/spice-client-gtk.override \
-			  tmp.defs > $@
-	@rm tmp.defs
-
-CLEANFILES += spice-client-gtk-module.defs.c spice-client-gtk.defs
-endif
-
 -include $(INTROSPECTION_MAKEFILE)
 
 if G_IR_SCANNER_SYMBOL_PREFIX
@@ -666,15 +609,6 @@ SpiceClientGLib_2_0_gir_SCANNERFLAGS = --c-include="spice-client.h"
 INTROSPECTION_GIRS += SpiceClientGLib-2.0.gir
 
 if WITH_GTK
-if HAVE_GTK_2
-SpiceClientGtk-2.0.gir: libspice-client-gtk-2.0.la SpiceClientGLib-2.0.gir
-SpiceClientGtk_2_0_gir_INCLUDES = GObject-2.0 Gtk-2.0 SpiceClientGLib-2.0
-SpiceClientGtk_2_0_gir_CFLAGS = $(SPICE_COMMON_CPPFLAGS)
-SpiceClientGtk_2_0_gir_LIBS = libspice-client-gtk-2.0.la libspice-client-glib-2.0.la
-SpiceClientGtk_2_0_gir_FILES = $(gtk_introspection_files)
-SpiceClientGtk_2_0_gir_EXPORT_PACKAGES = spice-client-gtk-2.0
-SpiceClientGtk_2_0_gir_SCANNERFLAGS = --c-include="spice-widget.h"
-else
 SpiceClientGtk-3.0.gir: libspice-client-gtk-3.0.la SpiceClientGLib-2.0.gir
 SpiceClientGtk_3_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 SpiceClientGLib-2.0
 SpiceClientGtk_3_0_gir_CFLAGS = $(SPICE_COMMON_CPPFLAGS)
@@ -682,8 +616,7 @@ SpiceClientGtk_3_0_gir_LIBS = libspice-client-gtk-3.0.la libspice-client-glib-2.
 SpiceClientGtk_3_0_gir_FILES = $(gtk_introspection_files)
 SpiceClientGtk_3_0_gir_EXPORT_PACKAGES = spice-client-gtk-3.0
 SpiceClientGtk_3_0_gir_SCANNERFLAGS = --c-include="spice-widget.h"
-endif
-INTROSPECTION_GIRS += SpiceClientGtk-$(SPICE_GTK_API_VERSION).gir
+INTROSPECTION_GIRS += SpiceClientGtk-3.0.gir
 endif
 
 girdir = $(datadir)/gir-1.0
diff --git a/src/channel-display-priv.h b/src/channel-display-priv.h
index 71f5d17..f92477b 100644
--- a/src/channel-display-priv.h
+++ b/src/channel-display-priv.h
@@ -40,7 +40,6 @@ typedef struct display_surface {
     bool                        primary;
     enum SpiceSurfaceFmt        format;
     int                         width, height, stride, size;
-    int                         shmid;
     uint8_t                     *data;
     SpiceCanvas                 *canvas;
     SpiceGlzDecoder             *glz_decoder;
diff --git a/src/channel-display.c b/src/channel-display.c
index 442642a..cdaba9d 100644
--- a/src/channel-display.c
+++ b/src/channel-display.c
@@ -21,14 +21,6 @@
 #include <sys/types.h>
 #endif
 
-#ifdef HAVE_SYS_SHM_H
-#include <sys/shm.h>
-#endif
-
-#ifdef HAVE_SYS_IPC_H
-#include <sys/ipc.h>
-#endif
-
 #include "glib-compat.h"
 #include "spice-client.h"
 #include "spice-common.h"
@@ -497,7 +489,7 @@ gboolean spice_display_get_primary(SpiceChannel *channel, guint32 surface_id,
     primary->width = surface->width;
     primary->height = surface->height;
     primary->stride = surface->stride;
-    primary->shmid = surface->shmid;
+    primary->shmid = -1;
     primary->data = surface->data;
     primary->marked = c->mark;
     CHANNEL_DEBUG(channel, "get primary %p", primary->data);
@@ -780,27 +772,11 @@ static int create_canvas(SpiceChannel *channel, display_surface *surface)
         }
 
         CHANNEL_DEBUG(channel, "Create primary canvas");
-#if defined(WITH_X11) && defined(HAVE_SYS_SHM_H)
-        surface->shmid = shmget(IPC_PRIVATE, surface->size, IPC_CREAT | 0777);
-        if (surface->shmid >= 0) {
-            surface->data = shmat(surface->shmid, 0, 0);
-            if (surface->data == NULL) {
-                shmctl(surface->shmid, IPC_RMID, 0);
-                surface->shmid = -1;
-            }
-        }
-#else
-        surface->shmid = -1;
-#endif
-    } else {
-        surface->shmid = -1;
     }
 
-    if (surface->shmid == -1)
-        surface->data = g_malloc0(surface->size);
+    surface->data = g_malloc0(surface->size);
 
     g_return_val_if_fail(c->glz_window, 0);
-
     g_warn_if_fail(surface->canvas == NULL);
     g_warn_if_fail(surface->glz_decoder == NULL);
     g_warn_if_fail(surface->zlib_decoder == NULL);
@@ -830,7 +806,7 @@ static int create_canvas(SpiceChannel *channel, display_surface *surface)
         c->primary = surface;
         g_coroutine_signal_emit(channel, signals[SPICE_DISPLAY_PRIMARY_CREATE], 0,
                                 surface->format, surface->width, surface->height,
-                                surface->stride, surface->shmid, surface->data);
+                                surface->stride, -1, surface->data);
 
         if (!spice_channel_test_capability(channel, SPICE_DISPLAY_CAP_MONITORS_CONFIG)) {
             g_array_set_size(c->monitors, 1);
@@ -854,16 +830,7 @@ static void destroy_canvas(display_surface *surface)
     zlib_decoder_destroy(surface->zlib_decoder);
     jpeg_decoder_destroy(surface->jpeg_decoder);
 
-    if (surface->shmid == -1) {
-        g_free(surface->data);
-    }
-#ifdef HAVE_SYS_SHM_H
-    else {
-        shmdt(surface->data);
-        shmctl(surface->shmid, IPC_RMID, 0);
-    }
-#endif
-    surface->shmid = -1;
+    g_free(surface->data);
     surface->data = NULL;
 
     surface->canvas->ops->destroy(surface->canvas);
diff --git a/src/gtk-compat.h b/src/gtk-compat.h
index aac3b55..b2cf6d6 100644
--- a/src/gtk-compat.h
+++ b/src/gtk-compat.h
@@ -22,12 +22,6 @@
 
 #include <gtk/gtk.h>
 
-#if !GTK_CHECK_VERSION (2, 91, 0)
-#define GDK_IS_X11_DISPLAY(D) TRUE
-#define gdk_window_get_display(W) gdk_drawable_get_display(GDK_DRAWABLE(W))
-#define GDK_IS_X11_WINDOW(D) TRUE
-#endif
-
 #if GTK_CHECK_VERSION (2, 91, 0)
 static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
 {
@@ -36,22 +30,4 @@ static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
 }
 #endif
 
-#if !GTK_CHECK_VERSION(2, 20, 0)
-static inline gboolean gtk_widget_get_realized(GtkWidget *widget)
-{
-    g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
-    return GTK_WIDGET_REALIZED(widget);
-}
-#endif
-
-#if !GTK_CHECK_VERSION (3, 0, 0)
-#define cairo_rectangle_int_t GdkRectangle
-#define cairo_region_t GdkRegion
-#define cairo_region_create_rectangle gdk_region_rectangle
-#define cairo_region_subtract_rectangle(_dest,_rect) { GdkRegion *_region = gdk_region_rectangle (_rect); gdk_region_subtract (_dest, _region); gdk_region_destroy (_region); }
-#define cairo_region_destroy gdk_region_destroy
-
-#define gdk_window_get_display(W) gdk_drawable_get_display(GDK_DRAWABLE(W))
-#endif
-
 #endif /* GTK_COMPAT_H */
diff --git a/src/spice-widget-cairo.c b/src/spice-widget-cairo.c
index 96af076..c92d4ec 100644
--- a/src/spice-widget-cairo.c
+++ b/src/spice-widget-cairo.c
@@ -132,26 +132,6 @@ void spicex_draw_event(SpiceDisplay *display, cairo_t *cr)
     }
 }
 
-#if ! GTK_CHECK_VERSION (2, 91, 0)
-G_GNUC_INTERNAL
-void spicex_expose_event(SpiceDisplay *display, GdkEventExpose *expose)
-{
-    cairo_t *cr;
-
-    cr = gdk_cairo_create(gtk_widget_get_window(GTK_WIDGET(display)));
-    cairo_rectangle(cr,
-                    expose->area.x,
-                    expose->area.y,
-                    expose->area.width,
-                    expose->area.height);
-    cairo_clip(cr);
-
-    spicex_draw_event(display, cr);
-
-    cairo_destroy(cr);
-}
-#endif
-
 G_GNUC_INTERNAL
 gboolean spicex_is_scaled(SpiceDisplay *display)
 {
diff --git a/src/spice-widget-priv.h b/src/spice-widget-priv.h
index 8ac0782..d28328d 100644
--- a/src/spice-widget-priv.h
+++ b/src/spice-widget-priv.h
@@ -20,12 +20,6 @@
 
 #include "config.h"
 
-#ifdef WITH_X11
-#include <X11/Xlib.h>
-#include <X11/extensions/XShm.h>
-#include <gdk/gdkx.h>
-#endif
-
 #ifdef WIN32
 #include <windows.h>
 #endif
@@ -73,7 +67,6 @@ struct _SpiceDisplayPrivate {
     gboolean                monitor_ready;
     enum SpiceSurfaceFmt    format;
     gint                    width, height, stride;
-    gint                    shmid;
     gpointer                data_origin; /* the original display image data */
     gpointer                data; /* converted if necessary to 32 bits */
 
@@ -82,21 +75,12 @@ struct _SpiceDisplayPrivate {
     gint                    ww, wh, mx, my;
 
     bool                    convert;
-    bool                    have_mitshm;
     gboolean                allow_scaling;
     gboolean                only_downscale;
     gboolean                disable_inputs;
 
     /* TODO: make a display object instead? */
-#ifdef WITH_X11
-    Display                 *dpy;
-    XVisualInfo             *vi;
-    XImage                  *ximage;
-    XShmSegmentInfo         *shminfo;
-    GC                      gc;
-#else
     cairo_surface_t         *ximage;
-#endif
 
     SpiceSession            *session;
     SpiceGtkSession         *gtk_session;
@@ -163,11 +147,7 @@ struct _SpiceDisplayPrivate {
 
 int      spicex_image_create                 (SpiceDisplay *display);
 void     spicex_image_destroy                (SpiceDisplay *display);
-#if GTK_CHECK_VERSION (2, 91, 0)
 void     spicex_draw_event                   (SpiceDisplay *display, cairo_t *cr);
-#else
-void     spicex_expose_event                 (SpiceDisplay *display, GdkEventExpose *ev);
-#endif
 gboolean spicex_is_scaled                    (SpiceDisplay *display);
 void     spice_display_get_scaling           (SpiceDisplay *display, double *s, int *x, int *y, int *w, int *h);
 gboolean spice_egl_init                      (SpiceDisplay *display, GError **err);
diff --git a/src/spice-widget-x11.c b/src/spice-widget-x11.c
deleted file mode 100644
index 3f2ce94..0000000
--- a/src/spice-widget-x11.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/*
-  Copyright (C) 2010 Red Hat, Inc.
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation; either
-  version 2.1 of the License, or (at your option) any later version.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, see <http://www.gnu.org/licenses/>.
-*/
-#include "config.h"
-
-#include "spice-widget.h"
-#include "spice-widget-priv.h"
-
-#ifdef HAVE_SYS_SHM_H
-#include <sys/shm.h>
-#endif
-
-#ifdef HAVE_SYS_IPC_H
-#include <sys/ipc.h>
-#endif
-
-static bool no_mitshm;
-
-static struct format_table {
-    enum SpiceSurfaceFmt  spice;
-    XVisualInfo           xvisual;
-} format_table[] = {
-    {
-        .spice = SPICE_SURFACE_FMT_32_ARGB, /* FIXME: is that correct xvisual? */
-        .xvisual = {
-            .depth      = 24,
-            .red_mask   = 0xff0000,
-            .green_mask = 0x00ff00,
-            .blue_mask  = 0x0000ff,
-        },
-    },{
-        .spice = SPICE_SURFACE_FMT_32_xRGB,
-        .xvisual = {
-            .depth      = 24,
-            .red_mask   = 0xff0000,
-            .green_mask = 0x00ff00,
-            .blue_mask  = 0x0000ff,
-        },
-    },{
-        .spice = SPICE_SURFACE_FMT_16_555,
-        .xvisual = {
-            .depth      = 16,
-            .red_mask   = 0x7c00,
-            .green_mask = 0x03e0,
-            .blue_mask  = 0x001f,
-        },
-    },{
-        .spice = SPICE_SURFACE_FMT_16_565,
-        .xvisual = {
-            .depth      = 16,
-            .red_mask   = 0xf800,
-            .green_mask = 0x07e0,
-            .blue_mask  = 0x001f,
-        },
-    }
-};
-
-static XVisualInfo *get_visual_for_format(GtkWidget *widget, enum SpiceSurfaceFmt format)
-{
-    GdkDrawable  *drawable = gtk_widget_get_window(widget);
-    GdkDisplay   *display = gdk_drawable_get_display(drawable);
-    GdkScreen    *screen = gdk_drawable_get_screen(drawable);
-    XVisualInfo  template;
-    int          found, i;
-    XVisualInfo *vi;
-
-    for (i = 0; i < SPICE_N_ELEMENTS(format_table); i++) {
-        if (format == format_table[i].spice)
-            break;
-    }
-    if (i == SPICE_N_ELEMENTS(format_table)) {
-        g_warn_if_reached();
-        return NULL;
-    }
-
-    template = format_table[i].xvisual;
-    template.screen = gdk_x11_screen_get_screen_number(screen);
-    vi = XGetVisualInfo(gdk_x11_display_get_xdisplay(display),
-                        VisualScreenMask | VisualDepthMask |
-                        VisualRedMaskMask | VisualGreenMaskMask | VisualBlueMaskMask,
-                        &template, &found);
-    return vi;
-}
-
-static XVisualInfo *get_visual_default(GtkWidget *widget)
-{
-    GdkDrawable  *drawable = gtk_widget_get_window(widget);
-    GdkDisplay   *display = gdk_drawable_get_display(drawable);
-    GdkScreen    *screen = gdk_drawable_get_screen(drawable);
-    XVisualInfo  template;
-    int          found;
-
-    template.screen = gdk_x11_screen_get_screen_number(screen);
-    return XGetVisualInfo(gdk_x11_display_get_xdisplay(display),
-                          VisualScreenMask,
-                          &template, &found);
-}
-
-static int catch_no_mitshm(Display * dpy, XErrorEvent * event)
-{
-    no_mitshm = true;
-    return 0;
-}
-
-G_GNUC_INTERNAL
-int spicex_image_create(SpiceDisplay *display)
-{
-    SpiceDisplayPrivate   *d = display->priv;
-
-    if (d->ximage != NULL)
-        return 0;
-
-    GdkDrawable     *window = gtk_widget_get_window(GTK_WIDGET(display));
-    GdkDisplay      *gtkdpy = gdk_drawable_get_display(window);
-    void            *old_handler = NULL;
-    XGCValues       gcval = {
-        .foreground = 0,
-        .background = 0,
-    };
-
-    d->dpy = gdk_x11_display_get_xdisplay(gtkdpy);
-    d->convert = false;
-    d->vi = get_visual_for_format(GTK_WIDGET(display), d->format);
-    if (d->vi == NULL) {
-        d->convert = true;
-        d->vi = get_visual_default(GTK_WIDGET(display));
-        d->vi = get_visual_for_format(GTK_WIDGET(display), SPICE_SURFACE_FMT_32_xRGB);
-        g_return_val_if_fail(d->vi != NULL, 1);
-    }
-    if (d->convert) {
-        d->data = g_malloc0(d->height * d->stride); /* pixels are 32 bits */
-    }
-
-    d->gc = XCreateGC(d->dpy, gdk_x11_drawable_get_xid(window),
-                      GCForeground | GCBackground, &gcval);
-
-    if (d->convert) /* do not use shm when doing color format conversion */
-        goto xcreate;
-
-    if (d->have_mitshm && d->shmid != -1) {
-        if (!XShmQueryExtension(d->dpy)) {
-            goto shm_fail;
-        }
-        no_mitshm = false;
-        old_handler = XSetErrorHandler(catch_no_mitshm);
-        d->shminfo = g_new0(XShmSegmentInfo, 1);
-        d->ximage = XShmCreateImage(d->dpy, d->vi->visual, d->vi->depth,
-                                    ZPixmap, d->data, d->shminfo, d->width, d->height);
-        if (d->ximage == NULL)
-            goto shm_fail;
-        d->shminfo->shmaddr = d->data;
-        d->shminfo->shmid = d->shmid;
-        d->shminfo->readOnly = false;
-        XShmAttach(d->dpy, d->shminfo);
-        XSync(d->dpy, False);
-        shmctl(d->shmid, IPC_RMID, 0);
-        if (no_mitshm)
-            goto shm_fail;
-        XSetErrorHandler(old_handler);
-        return 0;
-    }
-
- shm_fail:
-    d->have_mitshm = false;
-    g_free(d->shminfo);
-    d->shminfo = NULL;
-    if (old_handler)
-        XSetErrorHandler(old_handler);
- xcreate:
-    d->ximage = XCreateImage(d->dpy, d->vi->visual, d->vi->depth, ZPixmap, 0,
-                             d->data, d->width, d->height, 32, d->stride);
-    return 0;
-}
-
-G_GNUC_INTERNAL
-void spicex_image_destroy(SpiceDisplay *display)
-{
-    SpiceDisplayPrivate *d = display->priv;
-
-    if (d->ximage) {
-        /* avoid XDestroy to free shared memory, owned and freed by
-           channel-display itself */
-        if (d->ximage->data == d->data_origin)
-            d->ximage->data = NULL;
-        XDestroyImage(d->ximage);
-        d->ximage = NULL;
-        if (d->convert)
-            d->data = 0;
-    }
-    if (d->shminfo) {
-        XShmDetach(d->dpy, d->shminfo);
-        free(d->shminfo);
-        d->shminfo = NULL;
-    }
-    if (d->gc) {
-        XFreeGC(d->dpy, d->gc);
-        d->gc = NULL;
-    }
-    if (d->convert && d->data) {
-        g_free(d->data);
-        d->data = NULL;
-    }
-}
-
-G_GNUC_INTERNAL
-void spicex_expose_event(SpiceDisplay *display, GdkEventExpose *expose)
-{
-    GdkDrawable *window = gtk_widget_get_window(GTK_WIDGET(display));
-    SpiceDisplayPrivate *d = display->priv;
-    int x, y, w, h;
-
-    spice_display_get_scaling(display, NULL, &x, &y, &w, &h);
-
-    if (expose->area.x >= x &&
-        expose->area.y >= y &&
-        expose->area.x + expose->area.width  <= x + w &&
-        expose->area.y + expose->area.height <= y + h) {
-        /* area is completely inside the guest screen -- blit it */
-        if (d->have_mitshm && d->shminfo) {
-            XShmPutImage(d->dpy, gdk_x11_drawable_get_xid(window),
-                         d->gc, d->ximage,
-                         d->area.x + expose->area.x - x, d->area.y + expose->area.y - y,
-                         expose->area.x, expose->area.y,
-                         expose->area.width, expose->area.height,
-                         true);
-        } else {
-            XPutImage(d->dpy, gdk_x11_drawable_get_xid(window),
-                      d->gc, d->ximage,
-                      d->area.x + expose->area.x - x, d->area.y + expose->area.y - y,
-                      expose->area.x, expose->area.y,
-                      expose->area.width, expose->area.height);
-        }
-    } else {
-        /* complete window update */
-        if (d->ww > d->area.width || d->wh > d->area.height) {
-            int x1 = x;
-            int x2 = x + w;
-            int y1 = y;
-            int y2 = y + h;
-            XFillRectangle(d->dpy, gdk_x11_drawable_get_xid(window),
-                           d->gc, 0, 0, x1, d->wh);
-            XFillRectangle(d->dpy, gdk_x11_drawable_get_xid(window),
-                           d->gc, x2, 0, d->ww - x2, d->wh);
-            XFillRectangle(d->dpy, gdk_x11_drawable_get_xid(window),
-                           d->gc, 0, 0, d->ww, y1);
-            XFillRectangle(d->dpy, gdk_x11_drawable_get_xid(window),
-                           d->gc, 0, y2, d->ww, d->wh - y2);
-        }
-        if (d->have_mitshm && d->shminfo) {
-            XShmPutImage(d->dpy, gdk_x11_drawable_get_xid(window),
-                         d->gc, d->ximage,
-                         d->area.x, d->area.y, x, y, w, h,
-                         true);
-        } else {
-            XPutImage(d->dpy, gdk_x11_drawable_get_xid(window),
-                      d->gc, d->ximage,
-                      d->area.x, d->area.y, x, y, w, h);
-        }
-    }
-}
-
-G_GNUC_INTERNAL
-gboolean spicex_is_scaled(SpiceDisplay *display)
-{
-    return FALSE; /* backend doesn't support scaling yet */
-}
diff --git a/src/spice-widget.c b/src/spice-widget.c
index ef166cb..3e7a731 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -574,17 +574,12 @@ static void spice_display_init(SpiceDisplay *display)
                           GDK_LEAVE_NOTIFY_MASK |
                           GDK_KEY_PRESS_MASK |
                           GDK_SCROLL_MASK);
-#ifdef WITH_X11
-    gtk_widget_set_double_buffered(widget, false);
-#else
     gtk_widget_set_double_buffered(widget, true);
-#endif
     gtk_widget_set_can_focus(widget, true);
     d->grabseq = spice_grab_sequence_new_from_string("Control_L+Alt_L");
     d->activeseq = g_new0(gboolean, d->grabseq->nkeysyms);
 
     d->mouse_cursor = get_blank_cursor();
-    d->have_mitshm = true;
 
 #ifdef USE_EPOXY
     if (!spice_egl_init(display, &err)) {
@@ -1156,7 +1151,6 @@ static void set_egl_enabled(SpiceDisplay *display, bool enabled)
 #endif
 }
 
-#if GTK_CHECK_VERSION (2, 91, 0)
 static gboolean draw_event(GtkWidget *widget, cairo_t *cr)
 {
     SpiceDisplay *display = SPICE_DISPLAY(widget);
@@ -1180,24 +1174,6 @@ static gboolean draw_event(GtkWidget *widget, cairo_t *cr)
 
     return true;
 }
-#else
-static gboolean expose_event(GtkWidget *widget, GdkEventExpose *expose)
-{
-    SpiceDisplay *display = SPICE_DISPLAY(widget);
-    SpiceDisplayPrivate *d = display->priv;
-    g_return_val_if_fail(d != NULL, false);
-
-    if (d->mark == 0 || d->data == NULL ||
-        d->area.width == 0 || d->area.height == 0)
-        return false;
-    g_return_val_if_fail(d->ximage != NULL, false);
-
-    spicex_expose_event(display, expose);
-    update_mouse_pointer(display);
-
-    return true;
-}
-#endif
 
 /* ---------------------------------------------------------------- */
 typedef enum {
@@ -1855,11 +1831,7 @@ static void spice_display_class_init(SpiceDisplayClass *klass)
     GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
     GtkWidgetClass *gtkwidget_class = GTK_WIDGET_CLASS(klass);
 
-#if GTK_CHECK_VERSION (2, 91, 0)
     gtkwidget_class->draw = draw_event;
-#else
-    gtkwidget_class->expose_event = expose_event;
-#endif
     gtkwidget_class->key_press_event = key_event;
     gtkwidget_class->key_release_event = key_event;
     gtkwidget_class->enter_notify_event = enter_event;
@@ -2213,7 +2185,6 @@ static void primary_create(SpiceChannel *channel, gint format,
 
     d->format = format;
     d->stride = stride;
-    d->shmid = shmid;
     d->width = width;
     d->height = height;
     d->data_origin = d->data = imgdata;
@@ -2230,7 +2201,6 @@ static void primary_destroy(SpiceChannel *channel, gpointer data)
     d->width  = 0;
     d->height = 0;
     d->stride = 0;
-    d->shmid  = 0;
     d->data = NULL;
     d->data_origin = NULL;
     set_monitor_ready(display, false);
diff --git a/vapi/Makefile.am b/vapi/Makefile.am
index c66b1db..aaab848 100644
--- a/vapi/Makefile.am
+++ b/vapi/Makefile.am
@@ -10,12 +10,11 @@ dist_vapi_DATA =					\
 	$(NULL)
 
 if WITH_GTK
-vapi_DATA += spice-client-gtk-$(SPICE_GTK_API_VERSION).vapi
-dist_vapi_DATA += spice-client-gtk-$(SPICE_GTK_API_VERSION).deps
+vapi_DATA += spice-client-gtk-3.0.vapi
+dist_vapi_DATA += spice-client-gtk-3.0.deps
 endif
 
 EXTRA_DIST =						\
-	spice-client-gtk-2.0.deps			\
 	spice-client-gtk-3.0.deps			\
 	SpiceClientGLib-2.0.metadata			\
 	$(NULL)
@@ -29,13 +28,13 @@ spice-client-glib-2.0.vapi: $(top_builddir)/src/SpiceClientGLib-2.0.gir SpiceCli
 		--pkg gio-2.0			\
 		$<
 
-spice-client-gtk-$(SPICE_GTK_API_VERSION).vapi: $(top_builddir)/src/SpiceClientGtk-$(SPICE_GTK_API_VERSION).gir spice-client-glib-2.0.vapi
+spice-client-gtk-3.0.vapi: $(top_builddir)/src/SpiceClientGtk-3.0.gir spice-client-glib-2.0.vapi
 	$(AM_V_GEN)$(VAPIGEN) -q					\
 		--vapidir=$(builddir)					\
 		--girdir=$(top_builddir)/src				\
 		--pkg spice-client-glib-2.0				\
-		--pkg gtk+-$(GTK_API_VERSION)				\
-		--library spice-client-gtk-$(SPICE_GTK_API_VERSION)	\
+		--pkg gtk+-3.0						\
+		--library spice-client-gtk-3.0				\
 		$<
 
 -include $(top_srcdir)/git.mk
commit 693cef4eaa3d761c7d719dcbeae0df572fb26966
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Wed Dec 16 16:47:00 2015 +0100

    gtk: make SpiceGrabSequence private
    
    Do not leak internals of SpiceGrabSequence in public headers. This makes also
    the class final, which let us extend more easily without fear of breaking ABI.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Acked-by: Fabiano Fidêncio <fidencio at redhat.com>

diff --git a/src/Makefile.am b/src/Makefile.am
index e35c046..d6935cf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -140,6 +140,7 @@ SPICE_GTK_SOURCES_COMMON =		\
 	vncdisplaykeymap.h		\
 	spice-grabsequence.c		\
 	spice-grabsequence.h		\
+	spice-grabsequence-priv.h	\
 	desktop-integration.c		\
 	desktop-integration.h		\
 	usb-device-widget.c		\
diff --git a/src/spice-grabsequence-priv.h b/src/spice-grabsequence-priv.h
new file mode 100644
index 0000000..5475730
--- /dev/null
+++ b/src/spice-grabsequence-priv.h
@@ -0,0 +1,28 @@
+/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/*
+  Copyright (C) 2016 Red Hat, Inc.
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License, or (at your option) any later version.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, see <http://www.gnu.org/licenses/>.
+*/
+#ifndef __SPICE_GRABSEQUENCE_PRIV_H__
+#define __SPICE_GRABSEQUENCE_PRIV_H__
+
+#include <glib.h>
+
+struct _SpiceGrabSequence {
+    guint nkeysyms;
+    guint *keysyms;
+};
+
+#endif
diff --git a/src/spice-grabsequence.c b/src/spice-grabsequence.c
index a51d9e6..50e774d 100644
--- a/src/spice-grabsequence.c
+++ b/src/spice-grabsequence.c
@@ -24,6 +24,7 @@
 #include <gdk/gdk.h>
 
 #include "spice-grabsequence.h"
+#include "spice-grabsequence-priv.h"
 
 GType spice_grab_sequence_get_type(void)
 {
diff --git a/src/spice-grabsequence.h b/src/spice-grabsequence.h
index 28979ec..6e68e29 100644
--- a/src/spice-grabsequence.h
+++ b/src/spice-grabsequence.h
@@ -35,19 +35,6 @@ G_BEGIN_DECLS
 
 typedef struct _SpiceGrabSequence SpiceGrabSequence;
 
-/**
- * SpiceGrabSequence:
- *
- * The #SpiceGrabSequence struct is opaque and should not be accessed directly.
- */
-struct _SpiceGrabSequence {
-        /*< private >*/
-	guint nkeysyms;
-	guint *keysyms;
-
-	/* Do not add fields to this struct */
-};
-
 GType spice_grab_sequence_get_type(void);
 
 SpiceGrabSequence *spice_grab_sequence_new(guint nkeysyms, guint *keysyms);
diff --git a/src/spice-widget.c b/src/spice-widget.c
index c3577a1..ef166cb 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -40,6 +40,7 @@
 #include "spice-widget-priv.h"
 #include "spice-gtk-session-priv.h"
 #include "vncdisplaykeymap.h"
+#include "spice-grabsequence-priv.h"
 
 #include "glib-compat.h"
 #include "gtk-compat.h"
commit bc3d12efb20423d5b1ebd490658f687c4bd323fd
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Tue Feb 16 20:59:35 2016 +0100

    gtk: make SpiceUsbDeviceWidget private
    
    Do not leak internals of SpiceUsbDeviceWidget in public headers. This makes also
    the class final, which let us extend more easily without fear of breaking ABI.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Acked-by: Fabiano Fidêncio <fidencio at redhat.com>

diff --git a/src/usb-device-widget.c b/src/usb-device-widget.c
index 59273f9..faa6c6d 100644
--- a/src/usb-device-widget.c
+++ b/src/usb-device-widget.c
@@ -39,6 +39,22 @@
  * add an UI to select USB devices to redirect (or unredirect).
  */
 
+struct _SpiceUsbDeviceWidget
+{
+    GtkVBox parent;
+
+    SpiceUsbDeviceWidgetPrivate *priv;
+};
+
+struct _SpiceUsbDeviceWidgetClass
+{
+    GtkVBoxClass parent_class;
+
+    /* signals */
+    void (*connect_failed) (SpiceUsbDeviceWidget *widget,
+                            SpiceUsbDevice *device, GError *error);
+};
+
 /* ------------------------------------------------------------------ */
 /* Prototypes for callbacks  */
 static void device_added_cb(SpiceUsbDeviceManager *manager,
diff --git a/src/usb-device-widget.h b/src/usb-device-widget.h
index 8ce91f2..a4ba638 100644
--- a/src/usb-device-widget.h
+++ b/src/usb-device-widget.h
@@ -41,42 +41,6 @@ typedef struct _SpiceUsbDeviceWidget SpiceUsbDeviceWidget;
 typedef struct _SpiceUsbDeviceWidgetClass SpiceUsbDeviceWidgetClass;
 typedef struct _SpiceUsbDeviceWidgetPrivate SpiceUsbDeviceWidgetPrivate;
 
-/**
- * SpiceUsbDeviceWidget:
- *
- * The #SpiceUsbDeviceWidget struct is opaque and should not be accessed directly.
- */
-struct _SpiceUsbDeviceWidget
-{
-    GtkVBox parent;
-
-    /*< private >*/
-    SpiceUsbDeviceWidgetPrivate *priv;
-    /* Do not add fields to this struct */
-};
-
-/**
- * SpiceUsbDeviceWidgetClass:
- * @parent_class: Parent class.
- * @connect_failed: Signal class handler for the #SpiceUsbDeviceWidget::connect-failed signal.
- *
- * Class structure for #SpiceUsbDeviceWidget.
- */
-struct _SpiceUsbDeviceWidgetClass
-{
-    GtkVBoxClass parent_class;
-
-    /* signals */
-    void (*connect_failed) (SpiceUsbDeviceWidget *widget,
-                            SpiceUsbDevice *device, GError *error);
-    /*< private >*/
-    /*
-     * If adding fields to this struct, remove corresponding
-     * amount of padding to avoid changing overall struct size
-     */
-    gchar _spice_reserved[SPICE_RESERVED_PADDING];
-};
-
 GType spice_usb_device_widget_get_type(void);
 GtkWidget *spice_usb_device_widget_new(SpiceSession    *session,
                                        const gchar     *device_format_string);
commit 8d1da627fb8c08cd1d784262a6b50965f4078472
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Wed Dec 16 15:29:40 2015 +0100

    gtk: make SpiceGtkSession private
    
    Do not leak internals of SpiceGtkSession in our headers. This makes also
    the class final, which let us extend more easily without fear of
    breaking ABI.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Acked-by: Fabiano Fidêncio <fidencio at redhat.com>

diff --git a/src/spice-gtk-session-priv.h b/src/spice-gtk-session-priv.h
index b2b6206..d7fe313 100644
--- a/src/spice-gtk-session-priv.h
+++ b/src/spice-gtk-session-priv.h
@@ -22,6 +22,19 @@
 
 G_BEGIN_DECLS
 
+typedef struct _SpiceGtkSessionPrivate SpiceGtkSessionPrivate;
+
+struct _SpiceGtkSession
+{
+    GObject parent;
+    SpiceGtkSessionPrivate *priv;
+};
+
+struct _SpiceGtkSessionClass
+{
+    GObjectClass parent_class;
+};
+
 void spice_gtk_session_request_auto_usbredir(SpiceGtkSession *self,
                                              gboolean state);
 gboolean spice_gtk_session_get_read_only(SpiceGtkSession *self);
diff --git a/src/spice-gtk-session.h b/src/spice-gtk-session.h
index 9a45d85..b04f4fc 100644
--- a/src/spice-gtk-session.h
+++ b/src/spice-gtk-session.h
@@ -35,39 +35,6 @@ G_BEGIN_DECLS
 
 typedef struct _SpiceGtkSession SpiceGtkSession;
 typedef struct _SpiceGtkSessionClass SpiceGtkSessionClass;
-typedef struct _SpiceGtkSessionPrivate SpiceGtkSessionPrivate;
-
-/**
- * SpiceGtkSession:
- *
- * The #SpiceGtkSession struct is opaque and should not be accessed directly.
- */
-struct _SpiceGtkSession
-{
-    GObject parent;
-    SpiceGtkSessionPrivate *priv;
-    /* Do not add fields to this struct */
-};
-
-/**
- * SpiceGtkSessionClass:
- * @parent_class: Parent class.
- *
- * Class structure for #SpiceGtkSession.
- */
-struct _SpiceGtkSessionClass
-{
-    GObjectClass parent_class;
-
-    /* signals */
-
-    /*< private >*/
-    /*
-     * If adding fields to this struct, remove corresponding
-     * amount of padding to avoid changing overall struct size
-     */
-    gchar _spice_reserved[SPICE_RESERVED_PADDING];
-};
 
 GType spice_gtk_session_get_type(void);
 
commit 0e70894bff28765e3becba031e19e6ae5d0097b8
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Wed Dec 16 15:23:25 2015 +0100

    gtk: make SpiceDisplay private
    
    Do not leak internals of SpiceDisplay in our headers. This makes also
    the class final, which let us extend more easily without fear of
    breaking ABI.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Acked-by: Fabiano Fidêncio <fidencio at redhat.com>

diff --git a/src/spice-widget-priv.h b/src/spice-widget-priv.h
index c708e25..8ac0782 100644
--- a/src/spice-widget-priv.h
+++ b/src/spice-widget-priv.h
@@ -40,6 +40,21 @@
 
 G_BEGIN_DECLS
 
+typedef struct _SpiceDisplayPrivate SpiceDisplayPrivate;
+
+struct _SpiceDisplay {
+    GtkDrawingArea parent;
+    SpiceDisplayPrivate *priv;
+};
+
+struct _SpiceDisplayClass {
+    GtkDrawingAreaClass parent_class;
+
+    /* signals */
+    void (*mouse_grab)(SpiceChannel *channel, gint grabbed);
+    void (*keyboard_grab)(SpiceChannel *channel, gint grabbed);
+};
+
 #define SPICE_DISPLAY_GET_PRIVATE(obj)                                  \
     (G_TYPE_INSTANCE_GET_PRIVATE((obj), SPICE_TYPE_DISPLAY, SpiceDisplayPrivate))
 
diff --git a/src/spice-widget.h b/src/spice-widget.h
index 213db7a..5a7c206 100644
--- a/src/spice-widget.h
+++ b/src/spice-widget.h
@@ -42,41 +42,6 @@ G_BEGIN_DECLS
 
 typedef struct _SpiceDisplay SpiceDisplay;
 typedef struct _SpiceDisplayClass SpiceDisplayClass;
-typedef struct _SpiceDisplayPrivate SpiceDisplayPrivate;
-
-/**
- * SpiceDisplay:
- *
- * The #SpiceDisplay struct is opaque and should not be accessed directly.
- */
-struct _SpiceDisplay {
-    GtkDrawingArea parent;
-    SpiceDisplayPrivate *priv;
-    /* Do not add fields to this struct */
-};
-
-/**
- * SpiceDisplayClass:
- * @parent_class: Parent class.
- * @mouse_grab: Signal class handler for the #SpiceDisplay::mouse_grab signal.
- * @keyboard_grab: Signal class handler for the #SpiceDisplay::keyboard_grab signal.
- *
- * Class structure for #SpiceDisplay.
- */
-struct _SpiceDisplayClass {
-    GtkDrawingAreaClass parent_class;
-
-    /* signals */
-    void (*mouse_grab)(SpiceChannel *channel, gint grabbed);
-    void (*keyboard_grab)(SpiceChannel *channel, gint grabbed);
-
-    /*< private >*/
-    /*
-     * If adding fields to this struct, remove corresponding
-     * amount of padding to avoid changing overall struct size
-     */
-    gchar _spice_reserved[SPICE_RESERVED_PADDING];
-};
 
 /**
  * SpiceDisplayKeyEvent:
commit cbfc0e9e3f67ccc5910e48ca9da4aaa1b321d61d
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Wed Dec 16 16:52:12 2015 +0100

    build-sys: bump spice-gtk current version info
    
    The following patches need to break the ABI (in particular the parent of the
    SpiceDisplay widget).
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Acked-by: Fabiano Fidêncio <fidencio at redhat.com>

diff --git a/src/Makefile.am b/src/Makefile.am
index 68884e6..e35c046 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -113,7 +113,7 @@ AM_CPPFLAGS =					\
 
 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
 SPICE_GTK_LDFLAGS_COMMON =		\
-	-version-info 4:0:0		\
+	-version-info 5:0:0		\
 	-no-undefined			\
 	$(GTK_SYMBOLS_LDFLAGS)		\
 	$(NULL)


More information about the Spice-commits mailing list