mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
widget: Ignore events on unmapped widgets
There was a special case for GtkSearchBar, so remove that one.
This commit is contained in:
parent
bde2332a1a
commit
245cebec1d
@ -641,9 +641,6 @@ capture_widget_key_handled (GtkEventControllerKey *controller,
|
||||
GtkSearchBarPrivate *priv = gtk_search_bar_get_instance_private (bar);
|
||||
gboolean handled;
|
||||
|
||||
if (!gtk_widget_get_mapped (GTK_WIDGET (bar)))
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
|
||||
if (priv->reveal_child)
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
|
||||
|
@ -5184,7 +5184,7 @@ translate_event_coordinates (GdkEvent *event,
|
||||
gdk_event_set_coords (event, dx, dy);
|
||||
}
|
||||
|
||||
static gint
|
||||
static gboolean
|
||||
gtk_widget_event_internal (GtkWidget *widget,
|
||||
const GdkEvent *event)
|
||||
{
|
||||
@ -5199,6 +5199,9 @@ gtk_widget_event_internal (GtkWidget *widget,
|
||||
if (!event_surface_is_still_viewable (event))
|
||||
return TRUE;
|
||||
|
||||
if (!_gtk_widget_get_mapped (widget))
|
||||
return FALSE;
|
||||
|
||||
event_copy = gdk_event_copy (event);
|
||||
|
||||
translate_event_coordinates (event_copy, widget);
|
||||
|
Loading…
Reference in New Issue
Block a user