Disable tooltips in touchscreen mode.

2007-08-07  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (_gtk_tooltip_handle_event): Disable tooltips
	in touchscreen mode.


svn path=/trunk/; revision=18586
This commit is contained in:
Kristian Rietveld 2007-08-07 11:28:01 +00:00 committed by Kristian Rietveld
parent 5f1c5eae14
commit 02eda450ea
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2007-08-07 Kristian Rietveld <kris@imendio.com>
* gtk/gtktooltip.c (_gtk_tooltip_handle_event): Disable tooltips
in touchscreen mode.
2007-07-31 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (gdk_window_get_geometry):

View File

@ -1078,9 +1078,20 @@ _gtk_tooltip_handle_event (GdkEvent *event)
{
gint x, y;
gboolean return_value = FALSE;
gboolean touchscreen;
GtkWidget *has_tooltip_widget = NULL;
GdkScreen *screen;
GdkDisplay *display;
GtkTooltip *current_tooltip;
GtkSettings *settings;
/* Disable tooltips in touchscreen mode */
screen = gdk_drawable_get_screen (event->any.window);
settings = gtk_settings_get_for_screen (screen);
g_object_get (settings, "gtk-touchscreen-mode", &touchscreen, NULL);
if (touchscreen)
return;
has_tooltip_widget = find_topmost_widget_coords_from_event (event, &x, &y);
display = gdk_drawable_get_display (event->any.window);