gtk2/gtk/gtktooltipprivate.h
Nelson Benítez León ce7e99ca5e tooltips: hide tooltips before showing popups
because if there's a tooltip visible then popups fail to show
with the following warning:
"Gdk-WARNING **: Tried to map a popup with a non-top most parent"

This bug affect popups of the form:
 1) popups from gtk_menu_popup_{at_widget|at_rect|for_device}()

    This can be reproduce with a normal GtkComboBox that has a
    tooltip attached (eg. via GtkBuilder 'tooltip_text' attribute).
    Also see GtkLabel reproducer from gtk3-demo mentioned in #1785

 2) custom popups created with gtk_window_new (GTK_WINDOW_POPUP)

    A reproducer that shows this case is a GtkComboBox with
    the property 'appears-as-list'[1] set to TRUE (default is FALSE).

Fixes issue #1785

[1] https://developer.gnome.org/gtk3/stable/GtkComboBox.html#GtkComboBox--s-appears-as-list
2019-09-03 20:01:20 -04:00

51 lines
1.9 KiB
C

/* GTK - The GIMP Toolkit
* Copyright (C) 2014 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#ifndef __GTK_TOOLTIP_PRIVATE_H__
#define __GTK_TOOLTIP_PRIVATE_H__
#include <gtk/gtktooltip.h>
G_BEGIN_DECLS
void _gtk_tooltip_focus_in (GtkWidget *widget);
void _gtk_tooltip_focus_out (GtkWidget *widget);
void _gtk_tooltip_toggle_keyboard_mode (GtkWidget *widget);
void _gtk_tooltip_handle_event (GdkEvent *event);
void _gtk_tooltip_hide (GtkWidget *widget);
void _gtk_tooltip_hide_in_display (GdkDisplay *display);
GtkWidget * _gtk_widget_find_at_coords (GdkWindow *window,
gint window_x,
gint window_y,
gint *widget_x,
gint *widget_y);
G_END_DECLS
#endif /* __GTK_TOOLTIP_PRIVATE_H__ */