Commit 12dfb368 authored by Matthias Clasen's avatar Matthias Clasen

Don't emit ::query-tooltip by name

This signal is emitted quite a bit, and we can easily avoid it.
parent 64710def
......@@ -824,12 +824,7 @@ gtk_tooltip_run_requery (GtkWidget **widget,
has_tooltip = gtk_widget_get_has_tooltip (*widget);
if (has_tooltip)
g_signal_emit_by_name (*widget,
"query-tooltip",
*x, *y,
tooltip->keyboard_mode_enabled,
tooltip,
&return_value);
return_value = gtk_widget_query_tooltip (widget, *x, *y, tooltip->keyboard_mode_enabled, tooltip);
if (!return_value)
{
......
......@@ -8093,6 +8093,25 @@ gtk_widget_real_query_tooltip (GtkWidget *widget,
return FALSE;
}
gboolean
gtk_widget_query_tooltip (GtkWidget *widget,
gint x,
gint y,
gboolean keyboard_mode,
GtkTooltip *tooltip)
{
gboolean retval = FALSE;
g_signal_emit (widget,
widget_signals[QUERY_TOOLTIP],
x, y,
keyboard_mode,
tooltip,
&retval);
return retval;
}
static void
gtk_widget_real_state_flags_changed (GtkWidget *widget,
GtkStateFlags old_state)
......
......@@ -297,6 +297,12 @@ gboolean gtk_widget_has_size_request (GtkWidget *widget);
void gtk_widget_reset_controllers (GtkWidget *widget);
gboolean gtk_widget_query_tooltip (GtkWidget *widget,
gint x,
gint y,
gboolean keyboard_mode,
GtkTooltip *tooltip);
/* inline getters */
static inline gboolean
......
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