[nautilus/wip/antoniof/view-focus-bugs: 1/2] files-view: Grab back focus when rename is done
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/view-focus-bugs: 1/2] files-view: Grab back focus when rename is done
- Date: Sat, 10 Sep 2022 22:46:08 +0000 (UTC)
commit cbb955f240ae3f2edd51cca65b51a01aa417c70d
Author: António Fernandes <antoniof gnome org>
Date: Sat Sep 10 23:03:48 2022 +0100
files-view: Grab back focus when rename is done
Otherwise the window's first focusable child (a headerbar button) gets
the focus instead of the view.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2483
src/nautilus-files-view.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index f19fab712..e185b4bbf 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -2006,6 +2006,7 @@ rename_file_popover_controller_on_name_accepted (NautilusFileNameWidgetControlle
nautilus_rename_file (target_file, name, NULL, NULL);
disconnect_rename_controller_signals (view);
+ gtk_widget_grab_focus (GTK_WIDGET (view));
}
static void
@@ -2017,6 +2018,7 @@ rename_file_popover_controller_on_cancelled (NautilusFileNameWidgetController *c
view = NAUTILUS_FILES_VIEW (user_data);
disconnect_rename_controller_signals (view);
+ gtk_widget_grab_focus (GTK_WIDGET (view));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]