forked from AuroraMiddleware/gtk
shortcutcontroller: Check for NULL GtkNative of widget
And just continue in that case.
This commit is contained in:
parent
7f009b9952
commit
d328374c94
@ -342,10 +342,16 @@ gtk_shortcut_controller_run_controllers (GtkEventController *controller,
|
||||
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (model));
|
||||
}
|
||||
|
||||
if (!_gtk_widget_is_sensitive (widget) ||
|
||||
!_gtk_widget_get_mapped (widget))
|
||||
{
|
||||
g_object_unref (shortcut);
|
||||
continue;
|
||||
}
|
||||
|
||||
native = gtk_widget_get_native (widget);
|
||||
if (!gtk_widget_is_sensitive (widget) ||
|
||||
!gtk_widget_get_mapped (widget) ||
|
||||
!gdk_surface_is_viewable (gtk_native_get_surface (native)))
|
||||
if (!native ||
|
||||
!gdk_surface_is_viewable(gtk_native_get_surface (native)))
|
||||
{
|
||||
g_object_unref (shortcut);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user