Commit 321ddb86 authored by Matthias Clasen's avatar Matthias Clasen

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
parent 57d00e00
......@@ -149,6 +149,8 @@ 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 inline GQuark tooltip_quark (void)
{
static GQuark quark;
......@@ -460,7 +462,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 */
......@@ -1404,6 +1406,15 @@ 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;
......@@ -1411,9 +1422,6 @@ _gtk_tooltip_handle_event (GdkEvent *event)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment