forked from AuroraMiddleware/gtk
Move a check to gtk_window_set_focus
gtk_widget_grab_focus is just a wrapper for gtk_window_set_focus. We should do all the enforcement there.
This commit is contained in:
parent
2bf1561b48
commit
029ec38e63
@ -5337,9 +5337,6 @@ gtk_widget_grab_focus (GtkWidget *widget)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
if (!gtk_widget_is_sensitive (widget))
|
||||
return;
|
||||
|
||||
GTK_WIDGET_GET_CLASS (widget)->grab_focus (widget);
|
||||
}
|
||||
|
||||
|
@ -7331,6 +7331,9 @@ static void
|
||||
gtk_window_real_set_focus (GtkWindow *window,
|
||||
GtkWidget *focus)
|
||||
{
|
||||
if (focus && !gtk_widget_is_sensitive (focus))
|
||||
return;
|
||||
|
||||
unset_focus_widget (window);
|
||||
set_focus_widget (window, focus);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user