forked from AuroraMiddleware/gtk
widget: Make grab_focus() fail on insensitive widgets
We can return FALSE early now instead of silently failing in gtk_window_set_focus().
This commit is contained in:
parent
427deb4f13
commit
14c34a7014
@ -5425,6 +5425,9 @@ gtk_widget_grab_focus (GtkWidget *widget)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
|
||||
|
||||
if (!gtk_widget_is_sensitive (widget))
|
||||
return FALSE;
|
||||
|
||||
return GTK_WIDGET_GET_CLASS (widget)->grab_focus (widget);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user