Exemple #1
0
static void
gtk_bubble_window_grab_notify (GtkWidget *widget,
                               gboolean   was_grabbed)
{
  GtkBubbleWindow *window = GTK_BUBBLE_WINDOW (widget);
  GtkBubbleWindowPrivate *priv;

  priv = window->priv;

  if (priv->device && gtk_widget_device_is_shadowed (widget, priv->device))
    _gtk_bubble_window_ungrab (window);
}
Exemple #2
0
static void
gtk_button_grab_notify (GtkWidget *widget,
			gboolean   was_grabbed)
{
  GtkButton *button = GTK_BUTTON (widget);
  GtkButtonPrivate *priv = button->priv;

  if (priv->activate_timeout &&
      priv->grab_keyboard &&
      gtk_widget_device_is_shadowed (widget, priv->grab_keyboard))
    gtk_button_finish_activate (button, FALSE);

  if (!was_grabbed)
    gtk_button_do_release (button, FALSE);
}