forked from AuroraMiddleware/gtk
Merge branch 'update_focus_indicators_in_popovers' into 'main'
update focus indicators in popovers See merge request GNOME/gtk!4124
This commit is contained in:
commit
f1612e36ee
@ -776,6 +776,7 @@ gtk_popover_key_pressed (GtkWidget *widget,
|
||||
GdkModifierType state)
|
||||
{
|
||||
GtkPopover *popover = GTK_POPOVER (widget);
|
||||
GtkWindow *root;
|
||||
|
||||
if (keyval == GDK_KEY_Escape)
|
||||
{
|
||||
@ -783,6 +784,8 @@ gtk_popover_key_pressed (GtkWidget *widget,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
root = GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (popover)));
|
||||
_gtk_window_update_focus_visible (root, keyval, state, TRUE);
|
||||
update_mnemonics_visible (popover, keyval, state, TRUE);
|
||||
|
||||
return FALSE;
|
||||
@ -795,7 +798,10 @@ gtk_popover_key_released (GtkWidget *widget,
|
||||
GdkModifierType state)
|
||||
{
|
||||
GtkPopover *popover = GTK_POPOVER (widget);
|
||||
GtkWindow *root;
|
||||
|
||||
root = GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (popover)));
|
||||
_gtk_window_update_focus_visible (root, keyval, state, FALSE);
|
||||
update_mnemonics_visible (popover, keyval, state, FALSE);
|
||||
|
||||
return FALSE;
|
||||
|
@ -4895,8 +4895,8 @@ update_mnemonics_visible (GtkWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
update_focus_visible (GtkWindow *window,
|
||||
void
|
||||
_gtk_window_update_focus_visible (GtkWindow *window,
|
||||
guint keyval,
|
||||
GdkModifierType state,
|
||||
gboolean visible)
|
||||
@ -4934,7 +4934,7 @@ gtk_window_key_pressed (GtkWidget *widget,
|
||||
{
|
||||
GtkWindow *window = GTK_WINDOW (widget);
|
||||
|
||||
update_focus_visible (window, keyval, state, TRUE);
|
||||
_gtk_window_update_focus_visible (window, keyval, state, TRUE);
|
||||
update_mnemonics_visible (window, keyval, state, TRUE);
|
||||
|
||||
return FALSE;
|
||||
@ -4949,7 +4949,7 @@ gtk_window_key_released (GtkWidget *widget,
|
||||
{
|
||||
GtkWindow *window = GTK_WINDOW (widget);
|
||||
|
||||
update_focus_visible (window, keyval, state, FALSE);
|
||||
_gtk_window_update_focus_visible (window, keyval, state, FALSE);
|
||||
update_mnemonics_visible (window, keyval, state, FALSE);
|
||||
|
||||
return FALSE;
|
||||
|
@ -34,6 +34,11 @@ void _gtk_window_group_remove_grab (GtkWindowGroup *window_group,
|
||||
void _gtk_window_unset_focus_and_default (GtkWindow *window,
|
||||
GtkWidget *widget);
|
||||
|
||||
void _gtk_window_update_focus_visible (GtkWindow *window,
|
||||
guint keyval,
|
||||
GdkModifierType state,
|
||||
gboolean visible);
|
||||
|
||||
void _gtk_window_set_allocation (GtkWindow *window,
|
||||
int width,
|
||||
int height,
|
||||
|
Loading…
Reference in New Issue
Block a user