[dconf-editor] Fix focus bug.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Fix focus bug.
- Date: Fri, 11 Jan 2019 13:01:34 +0000 (UTC)
commit 6a94e6a88385588c0dfed5a7af50d8f67638130c
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Jan 10 17:13:00 2019 +0100
Fix focus bug.
For unknown reasons, hitting Tab two times on a quite
small window, starting with the search entry focused,
makes the focus bug. Fix, by letting Gtk do its work.
editor/browser-window.vala | 8 ++++++--
editor/pathwidget.vala | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/editor/browser-window.vala b/editor/browser-window.vala
index 4b10b78..ec42435 100644
--- a/editor/browser-window.vala
+++ b/editor/browser-window.vala
@@ -721,6 +721,10 @@ private abstract class BrowserWindow : BaseWindow
uint keyval = event.keyval;
string name = (!) (Gdk.keyval_name (keyval) ?? "");
+ /* never override that */
+ if (keyval == Gdk.Key.Tab || keyval == Gdk.Key.KP_Tab)
+ return false;
+
/* for changing row during search; cannot use set_accels_for_action() else popovers are not handled
anymore */
if (name == "Down" && (event.state & Gdk.ModifierType.MOD1_MASK) == 0) // see also <ctrl>g
return _next_match ();
@@ -755,11 +759,11 @@ private abstract class BrowserWindow : BaseWindow
if (!headerbar.search_mode_enabled &&
// see gtk_search_entry_is_keynav() in gtk+/gtk/gtksearchentry.c:388
- (keyval == Gdk.Key.Tab || keyval == Gdk.Key.KP_Tab ||
- keyval == Gdk.Key.Up || keyval == Gdk.Key.KP_Up ||
+ (keyval == Gdk.Key.Up || keyval == Gdk.Key.KP_Up ||
keyval == Gdk.Key.Down || keyval == Gdk.Key.KP_Down ||
keyval == Gdk.Key.Left || keyval == Gdk.Key.KP_Left ||
keyval == Gdk.Key.Right || keyval == Gdk.Key.KP_Right ||
+ // keyval == Gdk.Key.Tab || keyval == Gdk.Key.KP_Tab || // already done
keyval == Gdk.Key.Home || keyval == Gdk.Key.KP_Home ||
keyval == Gdk.Key.End || keyval == Gdk.Key.KP_End ||
keyval == Gdk.Key.Page_Up || keyval == Gdk.Key.KP_Page_Up ||
diff --git a/editor/pathwidget.vala b/editor/pathwidget.vala
index 7fc4698..d1a9198 100644
--- a/editor/pathwidget.vala
+++ b/editor/pathwidget.vala
@@ -194,7 +194,7 @@ private class PathWidget : Box, AdaptativeWidget
} */
/*\
- * * sizing; TODO should be set by the center box of the headerbar, not by one of its child...
+ * * sizing; TODO should be set by the center box of the headerbar, not by one of its children...
\*/
internal override void get_preferred_width (out int minimum_width, out int natural_width)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]