[gnome-keyring] Remove support for GTK+2.



commit 176924344174f1510c3b5caa52399170d225acfc
Author: Stef Walter <stefw collabora co uk>
Date:   Fri May 13 22:39:09 2011 +0200

    Remove support for GTK+2.
    
     * Simplifies things going forward. Now that GTK+3 is in stable distros
       we can depend on it.
     * This was raised on the mailing list a while back.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=650144

 configure.ac                   |   36 +------------------------
 docs/reference/gcr/Makefile.am |    2 +-
 gcr/Makefile.am                |   20 +++++++-------
 gcr/gcr-display-scrolled.c     |    6 ----
 gcr/gcr-display-view.c         |   56 ----------------------------------------
 tool/Makefile.am               |   16 +++++------
 ui/Makefile.am                 |   20 ++++++--------
 ui/gku-prompt-tool.c           |   24 -----------------
 8 files changed, 29 insertions(+), 151 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 106fe86..ba5e133 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,8 +24,7 @@ GCK_REVISION=0
 GCK_AGE=0
 
 # GCR package versioning
-GCR_MAJOR_GTK2=0
-GCR_MAJOR_GTK3=3
+GCR_MAJOR=3
 GCR_MINOR=0
 GCR_MICRO=0
 
@@ -85,38 +84,9 @@ PKG_CHECK_MODULES(GIO, glib-2.0 >= 2.25.0 gio-2.0)
 AC_SUBST(GIO_CFLAGS)
 AC_SUBST(GIO_LIBS)
 
-AC_MSG_CHECKING([which GTK+ version to compile against])
-AC_ARG_WITH([gtk],
-	[AS_HELP_STRING([--with-gtk=2|3],[which GTK+ version to compile against (default: 3)])],
-	[case "$with_gtk" in
-		2*|3*) ;;
-		*) AC_MSG_ERROR([invalid GTK+ version specified]) ;;
-	esac],
-	[with_gtk=3])
-AC_MSG_RESULT([$with_gtk])
-
-case "$with_gtk" in
-	2*)
-		GCR_MAJOR=$GCR_MAJOR_GTK2
-		GCR_VERSION_SUFFIX=
-		GTK_API_VERSION=2.0
-		GTK_REQUIRED=2.20.0
-		with_gtk=2.0
-	;;
-	3*)
-		GCR_MAJOR=$GCR_MAJOR_GTK3
-		GCR_VERSION_SUFFIX=-$GCR_MAJOR
-		GTK_API_VERSION=3.0
-		GTK_REQUIRED=2.90.0
-		with_gtk=3.0
-	;;
-esac
-
-PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED)
+PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.0)
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
-AC_SUBST(GTK_API_VERSION)
-AM_CONDITIONAL([WITH_GTK3],[test "$with_gtk" = "3.0"])
 
 GETTEXT_PACKAGE=gnome-keyring
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext domain name])
@@ -704,7 +674,6 @@ AC_SUBST(GCK_MAJOR)
 GCR_LT_RELEASE=$GCR_CURRENT:$GCR_REVISION:$GCR_AGE
 AC_SUBST(GCR_LT_RELEASE)
 AC_SUBST(GCR_MAJOR)
-AC_SUBST(GCR_VERSION_SUFFIX)
 
 AC_SUBST(DAEMON_CFLAGS)
 AC_SUBST(DAEMON_LIBS)
@@ -806,7 +775,6 @@ echo "CONFIGURATION"
 echo "  SSH Agent:            $ssh_status"
 echo "  GPG Agent:            $gpg_status"
 echo "  Root Certificates:    $root_status"
-echo "  GTK+ Version:         $GTK_API_VERSION"
 echo "  PKCS#11 Modules:      $P11_SYSTEM_MODULES"
 echo
 echo "BUILD"
diff --git a/docs/reference/gcr/Makefile.am b/docs/reference/gcr/Makefile.am
index 09b5fe4..102a40c 100644
--- a/docs/reference/gcr/Makefile.am
+++ b/docs/reference/gcr/Makefile.am
@@ -94,7 +94,7 @@ expand_content_files=
 # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
 GTKDOC_CFLAGS= -I$(top_srcdir) -I$(top_builddir) $(GOBJECT_CFLAGS) -Wno-error
 GTKDOC_LIBS= $(GOBJECT_LIBS) \
-	$(top_builddir)/$(DOC_MODULE)/lib$(DOC_MODULE)@GCR_VERSION_SUFFIX  la \
+	$(top_builddir)/$(DOC_MODULE)/libgcr- GCR_MAJOR@.la \
 	$(top_builddir)/gck/libgck.la
 
 # This includes the standard gtk-doc make rules, copied by gtkdocize.
diff --git a/gcr/Makefile.am b/gcr/Makefile.am
index c82d2b8..ce367fd 100644
--- a/gcr/Makefile.am
+++ b/gcr/Makefile.am
@@ -13,7 +13,7 @@ SUBDIRS = . $(TESTS_DIR)
 # UI BUILDER
 # 
 
-uidir = $(datadir)/gcr GCR_VERSION_SUFFIX@/ui/
+uidir = $(datadir)/gcr- GCR_MAJOR@/ui/
 
 ui_DATA = \
 	gcr-import-dialog.ui \
@@ -22,7 +22,7 @@ ui_DATA = \
 # ------------------------------------------------------------------
 # HEADERS
 
-incdir = $(includedir)/gcr GCR_VERSION_SUFFIX@/gcr
+incdir = $(includedir)/gcr- GCR_MAJOR@/gcr
 
 inc_HEADERS = \
 	gcr.h \
@@ -69,9 +69,9 @@ INCLUDES = \
 BUILT_SOURCES = \
 	gcr-marshal.c gcr-marshal.h
 
-lib_LTLIBRARIES = libgcr GCR_VERSION_SUFFIX@.la
+lib_LTLIBRARIES = libgcr- GCR_MAJOR@.la
 
-libgcr GCR_VERSION_SUFFIX@_la_SOURCES = \
+libgcr_ GCR_MAJOR@_la_SOURCES = \
 	gcr-certificate.c gcr-certificate.h \
 	gcr-certificate-basics-widget.h gcr-certificate-basics-widget.c \
 	gcr-certificate-chain.c gcr-certificate-chain.h \
@@ -112,19 +112,19 @@ libgcr GCR_VERSION_SUFFIX@_la_SOURCES = \
 	gcr-viewer.c gcr-viewer.h \
 	$(BUILT_SOURCES)
 
-libgcr GCR_VERSION_SUFFIX@_la_CFLAGS = \
+libgcr_ GCR_MAJOR@_la_CFLAGS = \
 	-DGCK_API_SUBJECT_TO_CHANGE \
 	-DGCR_API_SUBJECT_TO_CHANGE \
 	-DP11_KIT_API_SUBJECT_TO_CHANGE \
 	-DGCR_COMPILATION \
 	-DUIDIR=\""$(uidir)"\"
 
-libgcr GCR_VERSION_SUFFIX@_la_LDFLAGS = \
+libgcr_ GCR_MAJOR@_la_LDFLAGS = \
 	-version-info $(GCR_LT_RELEASE) \
 	-no-undefined \
 	-export-symbols-regex '^gcr_*'
 
-libgcr GCR_VERSION_SUFFIX@_la_LIBADD = \
+libgcr_ GCR_MAJOR@_la_LIBADD = \
 	$(top_builddir)/egg/libegg.la \
 	$(top_builddir)/egg/libegg-entry-buffer.la \
 	$(top_builddir)/gck/libgck.la \
@@ -136,9 +136,9 @@ libgcr GCR_VERSION_SUFFIX@_la_LIBADD = \
 
 noinst_LTLIBRARIES = $(TESTABLE_LIB)
 libgcr_testable_la_SOURCES =
-libgcr_testable_la_LIBADD = $(libgcr GCR_VERSION_SUFFIX@_la_OBJECTS) \
-	$(libgcr GCR_VERSION_SUFFIX@_la_LIBADD)
-libgcr_testable_la_DEPENDENCIES = $(libgcr GCR_VERSION_SUFFIX@_la_OBJECTS)
+libgcr_testable_la_LIBADD = $(libgcr_ GCR_MAJOR@_la_OBJECTS) \
+	$(libgcr_ GCR_MAJOR@_la_LIBADD)
+libgcr_testable_la_DEPENDENCIES = $(libgcr_ GCR_MAJOR@_la_OBJECTS)
 
 gcr-marshal.h: gcr-marshal.list $(GLIB_GENMARSHAL)
 	$(GLIB_GENMARSHAL) $< --header --prefix=_gcr_marshal > $@
diff --git a/gcr/gcr-display-scrolled.c b/gcr/gcr-display-scrolled.c
index 222c7af..3de3111 100644
--- a/gcr/gcr-display-scrolled.c
+++ b/gcr/gcr-display-scrolled.c
@@ -60,8 +60,6 @@ _gcr_display_scrolled_constructed (GObject *object)
 	gtk_widget_show (GTK_WIDGET (self->pv->internal));
 }
 
-#if GTK_CHECK_VERSION (3,0,0)
-
 static void
 _gcr_display_scrolled_get_preferred_height (GtkWidget *widget, gint *minimal_height,
                                             gint *natural_height)
@@ -106,18 +104,14 @@ _gcr_display_scrolled_get_preferred_width (GtkWidget *widget, gint *minimal_widt
 	*natural_width = MAX (natural + 32, *natural_width);
 }
 
-#endif /* GTK 3.x */
-
 static void
 _gcr_display_scrolled_class_init (GcrDisplayScrolledClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-#if GTK_CHECK_VERSION (3,0,0)
 	GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
 	widget_class->get_preferred_height = _gcr_display_scrolled_get_preferred_height;
 	widget_class->get_preferred_width = _gcr_display_scrolled_get_preferred_width;
-#endif
 
 	object_class->constructed = _gcr_display_scrolled_constructed;
 
diff --git a/gcr/gcr-display-view.c b/gcr/gcr-display-view.c
index bf7b606..8dd702a 100644
--- a/gcr/gcr-display-view.c
+++ b/gcr/gcr-display-view.c
@@ -76,8 +76,6 @@ struct _GcrDisplayViewPrivate {
  * INTERNAL
  */
 
-#if GTK_CHECK_VERSION (3,0,0)
-
 static void
 ensure_measurements (GcrDisplayView *self)
 {
@@ -136,8 +134,6 @@ ensure_measurements (GcrDisplayView *self)
 	self->pv->have_measurements = TRUE;
 }
 
-#endif /* GTK+ 3 */
-
 static void
 recalculate_and_resize (GcrDisplayView *self)
 {
@@ -198,11 +194,7 @@ on_expander_realize (GtkWidget *widget, gpointer user_data)
 {
 	GdkCursor *cursor = gdk_cursor_new (GDK_ARROW);
 	gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
-#if GTK_CHECK_VERSION (2,91,7)
 	g_object_unref (cursor);
-#else
-	gdk_cursor_unref (cursor);
-#endif
 }
 
 static void
@@ -218,7 +210,6 @@ on_expander_expanded (GObject *object, GParamSpec *param_spec, gpointer user_dat
 static void
 style_display_item (GtkWidget *widget, GcrDisplayItem *item)
 {
-#if GTK_CHECK_VERSION (2,91,6)
 	GtkStyleContext *style;
 	GdkRGBA color;
 
@@ -231,10 +222,6 @@ style_display_item (GtkWidget *widget, GcrDisplayItem *item)
 	gtk_style_context_restore (style);
 
 	gtk_widget_override_background_color (item->details_widget, GTK_STATE_NORMAL, &color);
-#else
-	GtkStyle *style = gtk_widget_get_style (widget);
-	gtk_widget_modify_bg (item->details_widget, GTK_STATE_NORMAL, &style->base[GTK_STATE_NORMAL]);
-#endif
 }
 
 static GcrDisplayItem*
@@ -568,8 +555,6 @@ _gcr_display_view_button_press_event (GtkWidget *widget, GdkEventButton *event)
 	return handled;
 }
 
-#if GTK_CHECK_VERSION (2,91,0)
-
 static gboolean
 _gcr_display_view_draw (GtkWidget *widget, cairo_t *cr)
 {
@@ -587,33 +572,6 @@ _gcr_display_view_draw (GtkWidget *widget, cairo_t *cr)
 	return handled;
 }
 
-#else /* GTK 2.x */
-
-static gboolean
-_gcr_display_view_expose_event (GtkWidget *widget, GdkEventExpose *event)
-{
-	GcrDisplayView *self = GCR_DISPLAY_VIEW (widget);
-	gboolean handled = FALSE;
-	cairo_t *cr;
-
-	/* Have GtkTextView draw the text first. */
-	if (GTK_WIDGET_CLASS (_gcr_display_view_parent_class)->expose_event)
-		handled = GTK_WIDGET_CLASS (_gcr_display_view_parent_class)->expose_event (widget, event);
-
-	/* Render the pixbuf if it's available */
-	if (event->window == gtk_text_view_get_window (GTK_TEXT_VIEW (widget), GTK_TEXT_WINDOW_TEXT)) {
-		cr = gdk_cairo_create (event->window);
-		paint_widget_icons (GCR_DISPLAY_VIEW (self), cr);
-		cairo_destroy (cr);
-	}
-
-	return handled;
-}
-
-#endif /* GTK 2.x */
-
-#if GTK_CHECK_VERSION (3,0,0)
-
 static void
 _gcr_display_get_preferred_height (GtkWidget *widget, gint *minimal_height,
                                    gint *natural_height)
@@ -634,8 +592,6 @@ _gcr_display_get_preferred_width (GtkWidget *widget, gint *minimal_width,
 	*natural_width = self->pv->natural_width;
 }
 
-#endif /* GTK 3.x */
-
 static void
 _gcr_display_view_populate_popup (GtkTextView *text_view, GtkMenu *menu)
 {
@@ -666,17 +622,9 @@ _gcr_display_view_class_init (GcrDisplayViewClass *klass)
 
 	widget_class->realize = _gcr_display_view_realize;
 	widget_class->button_press_event = _gcr_display_view_button_press_event;
-
-#if GTK_CHECK_VERSION (3,0,0)
 	widget_class->get_preferred_height = _gcr_display_get_preferred_height;
 	widget_class->get_preferred_width = _gcr_display_get_preferred_width;
-#endif
-
-#if GTK_CHECK_VERSION (2,91,0)
 	widget_class->draw = _gcr_display_view_draw;
-#else
-	widget_class->expose_event = _gcr_display_view_expose_event;
-#endif
 
 	text_view_class->populate_popup = _gcr_display_view_populate_popup;
 }
@@ -1001,12 +949,8 @@ _gcr_display_view_set_icon (GcrDisplayView *self, GcrRenderer *renderer, GIcon *
 	                                       GTK_ICON_LOOKUP_USE_BUILTIN);
 
 	if (info) {
-#if GTK_CHECK_VERSION (2,91,0)
 		GtkStyleContext *style = gtk_widget_get_style_context (GTK_WIDGET (self));
 		item->pixbuf = gtk_icon_info_load_symbolic_for_context (info, style, FALSE, NULL);
-#else
-		item->pixbuf = gtk_icon_info_load_icon (info, NULL);
-#endif
 		gtk_icon_info_free (info);
 	}
 }
diff --git a/tool/Makefile.am b/tool/Makefile.am
index 2960e89..eccd550 100644
--- a/tool/Makefile.am
+++ b/tool/Makefile.am
@@ -1,5 +1,5 @@
 bin_PROGRAMS= \
-	gnome-keyring GCR_VERSION_SUFFIX@
+	gnome-keyring- GCR_MAJOR@
 
 INCLUDES=	\
 	-I$(top_srcdir) \
@@ -9,18 +9,18 @@ INCLUDES=	\
 	$(GLIB_CFLAGS) \
 	-DGCK_API_SUBJECT_TO_CHANGE
 
-gnome_keyring GCR_VERSION_SUFFIX@_SOURCES = \
+gnome_keyring_ GCR_MAJOR@_SOURCES = \
 	gkr-tool.c gkr-tool.h \
 	gkr-tool-import.c \
 	gkr-tool-trust.c \
 	gkr-tool-version.c
 
-gnome_keyring GCR_VERSION_SUFFIX@_CFLAGS = \
+gnome_keyring_ GCR_MAJOR@_CFLAGS = \
 	-DGCR_API_SUBJECT_TO_CHANGE \
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"
 
-gnome_keyring GCR_VERSION_SUFFIX@_LDADD = \
-	$(top_builddir)/gcr/libgcr GCR_VERSION_SUFFIX@.la \
+gnome_keyring_ GCR_MAJOR@_LDADD = \
+	$(top_builddir)/gcr/libgcr- GCR_MAJOR@.la \
 	$(top_builddir)/egg/libegg.la \
 	$(top_builddir)/gck/libgck.la \
 	$(GTHREAD_LIBS) \
@@ -28,8 +28,6 @@ gnome_keyring GCR_VERSION_SUFFIX@_LDADD = \
 	$(GCRYPT_LIBS) \
 	$(DAEMON_LIBS)
 
-# Install a link from gnome-keyring â gnome-keyring GCR_VERSION_SUFFIX@ to maintain compatibility
-if WITH_GTK3
+# Install a link from gnome-keyring > gnome-keyring- GCR_MAJOR@ to maintain compatibility
 install-exec-hook:
-	@test -e "$(DESTDIR)$(bindir)/gnome-keyring" || (cd $(DESTDIR)$(bindir) && $(LN_S) gnome-keyring GCR_VERSION_SUFFIX@ gnome-keyring)
-endif
+	@test -e "$(DESTDIR)$(bindir)/gnome-keyring" || (cd $(DESTDIR)$(bindir) && $(LN_S) gnome-keyring- GCR_MAJOR@ gnome-keyring)
diff --git a/ui/Makefile.am b/ui/Makefile.am
index bff9aea..9824677 100644
--- a/ui/Makefile.am
+++ b/ui/Makefile.am
@@ -11,7 +11,7 @@ SUBDIRS = . $(TESTS_DIR)
 
 INCLUDES= \
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-	-DPROMPTEXEC=\""$(libexecdir)/gnome-keyring-prompt GCR_VERSION_SUFFIX@"\" \
+	-DPROMPTEXEC=\""$(libexecdir)/gnome-keyring-prompt- GCR_MAJOR@"\" \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
 	$(GOBJECT_CFLAGS) \
@@ -21,7 +21,7 @@ INCLUDES= \
 # UI BUILDER
 #
 
-uidir = $(datadir)/gnome-keyring GCR_VERSION_SUFFIX@/ui/
+uidir = $(datadir)/gnome-keyring- GCR_MAJOR@/ui/
 
 ui_DATA = \
 	gku-prompt.ui
@@ -62,31 +62,29 @@ EXTRA_DIST = \
 #
 
 libexec_PROGRAMS= \
-	gnome-keyring-prompt GCR_VERSION_SUFFIX@
+	gnome-keyring-prompt- GCR_MAJOR@
 
-gnome_keyring_prompt GCR_VERSION_SUFFIX@_SOURCES = \
+gnome_keyring_prompt_ GCR_MAJOR@_SOURCES = \
 	gku-prompt-tool.c \
 	gku-prompt-util.c gku-prompt-util.h
 
-gnome_keyring_prompt GCR_VERSION_SUFFIX@_LDADD = \
+gnome_keyring_prompt_ GCR_MAJOR@_LDADD = \
 	$(top_builddir)/egg/libegg-prompt.la \
 	$(top_builddir)/egg/libegg-entry-buffer.la \
-	$(top_builddir)/gcr/libgcr GCR_VERSION_SUFFIX@.la \
+	$(top_builddir)/gcr/libgcr- GCR_MAJOR@.la \
 	$(top_builddir)/gck/libgck.la \
 	$(LIBGCRYPT_LIBS) \
 	$(GTK_LIBS)
 
-gnome_keyring_prompt GCR_VERSION_SUFFIX@_CFLAGS = \
+gnome_keyring_prompt_ GCR_MAJOR@_CFLAGS = \
 	-DUIDIR=\""$(uidir)"\" \
 	-DGCR_API_SUBJECT_TO_CHANGE \
 	$(LIBGCRYPT_CFLAGS) \
 	$(GTK_CFLAGS)
 
-# Install a link from gnome-keyring-prompt -> gnome-keyring-prompt GCR_VERSION_SUFFIX@ to maintain compatibility
-if WITH_GTK3
+# Install a link from gnome-keyring-prompt -> gnome-keyring-prompt- GCR_MAJOR@ to maintain compatibility
 install-exec-hook:
-	@test -e "$(DESTDIR)$(libexecdir)/gnome-keyring-prompt" || (cd $(DESTDIR)$(libexecdir) && $(LN_S) gnome-keyring-prompt GCR_VERSION_SUFFIX@ gnome-keyring-prompt)
-endif
+	@test -e "$(DESTDIR)$(libexecdir)/gnome-keyring-prompt" || (cd $(DESTDIR)$(libexecdir) && $(LN_S) gnome-keyring-prompt- GCR_MAJOR@ gnome-keyring-prompt)
 
 @INTLTOOL_DESKTOP_RULE@
 desktopdir= $(datadir)/applications
diff --git a/ui/gku-prompt-tool.c b/ui/gku-prompt-tool.c
index cad2c57..c719b23 100644
--- a/ui/gku-prompt-tool.c
+++ b/ui/gku-prompt-tool.c
@@ -52,12 +52,8 @@
 static GKeyFile *input_data = NULL;
 static GKeyFile *output_data = NULL;
 
-#if GTK_CHECK_VERSION (3,0,0)
 static GdkDevice *grabbed_device = NULL;
 static gulong grab_broken_id = 0;
-#else
-static gboolean keyboard_grabbed = FALSE;
-#endif
 
 /* An encryption key for returning passwords */
 static gpointer the_key = NULL;
@@ -109,7 +105,6 @@ grab_status_message (GdkGrabStatus status)
 	}
 }
 
-#if GTK_CHECK_VERSION (3,0,0)
 static gboolean
 on_grab_broken (GtkWidget * widget, GdkEventGrabBroken * event)
 {
@@ -118,7 +113,6 @@ on_grab_broken (GtkWidget * widget, GdkEventGrabBroken * event)
 
 	return TRUE;
 }
-#endif
 
 static gboolean
 grab_keyboard (GtkWidget *win, GdkEvent *event, gpointer unused)
@@ -126,7 +120,6 @@ grab_keyboard (GtkWidget *win, GdkEvent *event, gpointer unused)
 	GdkGrabStatus status;
 	guint32 at;
 
-#if GTK_CHECK_VERSION (3,0,0)
 	GdkDevice *device = NULL;
 	GdkDeviceManager *manager;
 	GdkDisplay *display;
@@ -162,17 +155,6 @@ grab_keyboard (GtkWidget *win, GdkEvent *event, gpointer unused)
 	} else {
 		g_message ("could not grab keyboard: %s", grab_status_message (status));
 	}
-#else
-	if (!keyboard_grabbed && GRAB_KEYBOARD) {
-		at = event ? gdk_event_get_time (event) : GDK_CURRENT_TIME;
-		status = gdk_keyboard_grab (gtk_widget_get_window (win), FALSE, at);
-		if (status == GDK_GRAB_SUCCESS) {
-			keyboard_grabbed = TRUE;
-		} else {
-			g_message ("could not grab keyboard: %s", grab_status_message (status));
-		}
-	}
-#endif
 
 	/* Always return false, so event is handled elsewhere */
 	return FALSE;
@@ -183,7 +165,6 @@ ungrab_keyboard (GtkWidget *win, GdkEvent *event, gpointer unused)
 {
 	guint32 at = event ? gdk_event_get_time (event) : GDK_CURRENT_TIME;
 
-#if GTK_CHECK_VERSION (3,0,0)
 	if (grabbed_device) {
 		g_signal_handler_disconnect (win, grab_broken_id);
 		gdk_device_ungrab (grabbed_device, at);
@@ -191,11 +172,6 @@ ungrab_keyboard (GtkWidget *win, GdkEvent *event, gpointer unused)
 		grabbed_device = NULL;
 		grab_broken_id = 0;
 	}
-#else
-	if (keyboard_grabbed)
-		gdk_keyboard_ungrab (at);
-	keyboard_grabbed = FALSE;
-#endif
 
 	/* Always return false, so event is handled elsewhere */
 	return FALSE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]