[gtk+/gtk-3-20] Make gtk_tooltip_trigger_tooltip_query work again
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-20] Make gtk_tooltip_trigger_tooltip_query work again
- Date: Thu, 4 Aug 2016 15:38:48 +0000 (UTC)
commit b89ba25631f27c2c0d7fb62918c86a2ca77adb1d
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jun 5 21:47:16 2016 -0400
Make gtk_tooltip_trigger_tooltip_query work again
This was broken ever since we started looking at the
source device of the event.
https://bugzilla.gnome.org/show_bug.cgi?id=674215
gtk/gtktooltip.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index a16edaf..d81a0c2 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -148,6 +148,9 @@ static void gtk_tooltip_display_closed (GdkDisplay *display,
static void gtk_tooltip_set_last_window (GtkTooltip *tooltip,
GdkWindow *window);
+static void gtk_tooltip_handle_event_internal (GdkEvent *event);
+
+
static GQuark quark_current_tooltip;
G_DEFINE_TYPE (GtkTooltip, gtk_tooltip, G_TYPE_OBJECT);
@@ -452,7 +455,7 @@ gtk_tooltip_trigger_tooltip_query (GdkDisplay *display)
event.motion.x_root = x;
event.motion.y_root = y;
- _gtk_tooltip_handle_event (&event);
+ gtk_tooltip_handle_event_internal (&event);
}
/* private functions */
@@ -1409,15 +1412,21 @@ tooltips_enabled (GdkEvent *event)
void
_gtk_tooltip_handle_event (GdkEvent *event)
{
+ if (!tooltips_enabled (event))
+ return;
+
+ gtk_tooltip_handle_event_internal (event);
+}
+
+static void
+gtk_tooltip_handle_event_internal (GdkEvent *event)
+{
gint x, y;
gboolean return_value = FALSE;
GtkWidget *has_tooltip_widget = NULL;
GdkDisplay *display;
GtkTooltip *current_tooltip;
- if (!tooltips_enabled (event))
- return;
-
/* Returns coordinates relative to has_tooltip_widget's allocation. */
has_tooltip_widget = find_topmost_widget_coords_from_event (event, &x, &y);
display = gdk_window_get_display (event->any.window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]