From: Benjamin Otte Date: Tue, 21 Mar 2023 13:06:33 +0000 (+0100) Subject: checkbutton: Only andle arrow focus if we're in a group X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~520^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1c64438b122870e085ffc19d914fe7a274871c5d;p=gtk4.git checkbutton: Only andle arrow focus if we're in a group If there is no other widget in the group that we can focus, don't focus and activate ourselves. Otherwise the arrow keys on checkbuttons toggle the checkbutton. --- diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c index 7b45cdf91f..a4a24fa8be 100644 --- a/gtk/gtkcheckbutton.c +++ b/gtk/gtkcheckbutton.c @@ -481,16 +481,15 @@ gtk_check_button_focus (GtkWidget *widget, } } + g_ptr_array_free (child_array, TRUE); - if (new_focus) + if (new_focus && new_focus != widget) { gtk_widget_grab_focus (new_focus); gtk_widget_activate (new_focus); + return TRUE; } - - g_ptr_array_free (child_array, TRUE); - - return TRUE; + return FALSE; } else {