mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
gtk/main: Reset active state on grab broken only if implicit
An implicit grab means some button is down, reset the active state only in that case when we get a grab broken event. Avoids active state accounting warnings when we do get active grabs broken (e.g. after selecting a menu option).
This commit is contained in:
parent
20918dbe8e
commit
5b4ac5456e
@ -1506,10 +1506,13 @@ handle_pointing_event (GdkEvent *event)
|
||||
case GDK_TOUCHPAD_SWIPE:
|
||||
break;
|
||||
case GDK_GRAB_BROKEN:
|
||||
target = gtk_window_lookup_effective_pointer_focus_widget (toplevel,
|
||||
device,
|
||||
sequence);
|
||||
set_widget_active_state (target, TRUE);
|
||||
if (gdk_grab_broken_event_get_implicit (event))
|
||||
{
|
||||
target = gtk_window_lookup_effective_pointer_focus_widget (toplevel,
|
||||
device,
|
||||
sequence);
|
||||
set_widget_active_state (target, TRUE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
|
Loading…
Reference in New Issue
Block a user