aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Hruby <michal.mhr@gmail.com>2011-10-03 17:01:24 +0200
committerMichal Hruby <michal.mhr@gmail.com>2011-10-03 17:01:24 +0200
commit93b180bd9bf92d66cd2e9bd1a8b93c2f2c4f6bb3 (patch)
tree82231f92e98a7593318d1a7a1011ae9c730b902a /src
parent8a32a25405f17569a97a36e909b4cbd3347aa0cd (diff)
parent565816b6512db46bb00f0a90d3bffacc351af7cc (diff)
downloadayatana-ido-93b180bd9bf92d66cd2e9bd1a8b93c2f2c4f6bb3.tar.gz
ayatana-ido-93b180bd9bf92d66cd2e9bd1a8b93c2f2c4f6bb3.tar.bz2
ayatana-ido-93b180bd9bf92d66cd2e9bd1a8b93c2f2c4f6bb3.zip
Merge lp:~mhr3/ido/bug-865122
Diffstat (limited to 'src')
-rw-r--r--src/idorange.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/idorange.c b/src/idorange.c
index ba5c2c8..7c55d47 100644
--- a/src/idorange.c
+++ b/src/idorange.c
@@ -25,6 +25,7 @@
#include "idorange.h"
#include "idotypebuiltins.h"
+#include "config.h"
struct _IdoRangePrivate
{
@@ -40,6 +41,10 @@ static void ido_range_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
+#ifdef USE_GTK3
+static void ido_range_grab_notify (GtkWidget *widget,
+ gboolean was_grabbed);
+#endif
#define IDO_RANGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), IDO_TYPE_RANGE, IdoRangePrivate))
@@ -60,6 +65,10 @@ ido_range_class_init (IdoRangeClass *class)
gobject_class->set_property = ido_range_set_property;
gobject_class->get_property = ido_range_get_property;
+#ifdef USE_GTK3
+ widget_class->grab_notify = ido_range_grab_notify;
+#endif
+
g_object_class_install_property (gobject_class,
PROP_STYLE,
g_param_spec_enum ("range-style",
@@ -130,6 +139,21 @@ ido_range_set_property (GObject *object,
}
}
+#ifdef USE_GTK3
+static void
+ido_range_grab_notify (GtkWidget *widget, gboolean was_grabbed)
+{
+ /*
+ * FIXME: workaround for lp bug #865122.
+ * Without this handler, GtkRange will call remove_grab which results
+ * in an infinite loop of grab_notifies.
+ *
+ * The widget will still work properly, because grab-broken-event will get
+ * properly fired and internal state of GtkRange will be properly updated.
+ */
+}
+#endif
+
static void
ido_range_constructed (GObject *object)
{