[gtk/misc-cleanups: 6/8] window: Lower the visible focus timeout
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/misc-cleanups: 6/8] window: Lower the visible focus timeout
- Date: Tue, 5 May 2020 14:46:47 +0000 (UTC)
commit e33da185777fa9973895cc495e730f34a87246d2
Author: Matthias Clasen <mclasen redhat com>
Date: Tue May 5 10:37:10 2020 -0400
window: Lower the visible focus timeout
Five seconds felt too long for some people in
initial feedback, so lets lower the timeout to
3 seconds.
gtk/gtkwindow.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index fbf0a065b7..eedbabd17c 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -163,7 +163,10 @@
#define MENU_BAR_ACCEL GDK_KEY_F10
#define RESIZE_HANDLE_SIZE 20
#define MNEMONICS_DELAY 300 /* ms */
-#define NO_CONTENT_CHILD_NAT 200
+#define NO_CONTENT_CHILD_NAT 200 /* ms */
+#define VISIBLE_FOCUS_DURATION 3 /* s */
+
+
/* In case the content (excluding header bar and shadows) of the window
* would be empty, either because there is no visible child widget or only an
* empty container widget, we use NO_CONTENT_CHILD_NAT as natural width/height
@@ -7470,7 +7473,7 @@ gtk_window_set_focus_visible (GtkWindow *window,
}
if (priv->focus_visible)
- priv->focus_visible_timeout = g_timeout_add_seconds (5, unset_focus_visible, window);
+ priv->focus_visible_timeout = g_timeout_add_seconds (VISIBLE_FOCUS_DURATION, unset_focus_visible,
window);
if (changed)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]