gtkwidget: Drop gtk_widget_device_is_shadowed()

A widget no longer needs updating on GTK grabs on itself, drop
this miscellaneous and no longer used API.
This commit is contained in:
Carlos Garnacho 2020-06-24 17:25:34 +02:00
parent 1c5cf17f1c
commit f046e27bb4
3 changed files with 0 additions and 47 deletions

View File

@ -4503,7 +4503,6 @@ gtk_widget_set_receives_default
gtk_widget_get_receives_default
gtk_widget_get_realized
gtk_widget_get_mapped
gtk_widget_device_is_shadowed
gtk_widget_get_opacity
gtk_widget_set_opacity
gtk_widget_get_overflow

View File

@ -5218,48 +5218,6 @@ _gtk_widget_set_has_grab (GtkWidget *widget,
priv->has_grab = has_grab;
}
/**
* gtk_widget_device_is_shadowed:
* @widget: a #GtkWidget
* @device: a #GdkDevice
*
* Returns %TRUE if @device has been shadowed by a GTK+
* device grab on another widget, so it would stop sending
* events to @widget. This may be used in the
* #GtkWidget::grab-notify signal to check for specific
* devices. See gtk_device_grab_add().
*
* Returns: %TRUE if there is an ongoing grab on @device
* by another #GtkWidget than @widget.
**/
gboolean
gtk_widget_device_is_shadowed (GtkWidget *widget,
GdkDevice *device)
{
GtkWindowGroup *group;
GtkWidget *grab_widget;
GtkRoot *root;
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
if (!_gtk_widget_get_realized (widget))
return TRUE;
root = _gtk_widget_get_root (widget);
if (GTK_IS_WINDOW (root))
group = gtk_window_get_group (GTK_WINDOW (root));
else
group = gtk_window_get_group (NULL);
grab_widget = gtk_window_group_get_current_grab (group);
if (grab_widget && widget != grab_widget &&
!gtk_widget_is_ancestor (widget, grab_widget))
return TRUE;
return FALSE;
}
/**
* gtk_widget_set_name:
* @widget: a #GtkWidget

View File

@ -427,10 +427,6 @@ void gtk_widget_set_receives_default (GtkWidget *widget,
GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_get_receives_default (GtkWidget *widget);
GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_device_is_shadowed (GtkWidget *widget,
GdkDevice *device);
GDK_AVAILABLE_IN_ALL
void gtk_widget_set_name (GtkWidget *widget,