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));
|
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);
|
native = gtk_widget_get_native (widget);
|
||||||
if (!gtk_widget_is_sensitive (widget) ||
|
if (!native ||
|
||||||
!gtk_widget_get_mapped (widget) ||
|
!gdk_surface_is_viewable(gtk_native_get_surface (native)))
|
||||||
!gdk_surface_is_viewable (gtk_native_get_surface (native)))
|
|
||||||
{
|
{
|
||||||
g_object_unref (shortcut);
|
g_object_unref (shortcut);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user