summaryrefslogtreecommitdiff
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-10 14:28:34 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-10 14:28:34 +0300
commitd2884d9ea436eda4138a6fbba0ab829e56472c3c (patch)
tree0b32f5c3d2b6b2b571d255405bac48e600d52d05 /src/ui/window.c
parentf8be77b76b08405e88580d482e0704a50f54805d (diff)
Fixed switching focus with Tab key
Focus should go from URL bar to lookup results, and only then to the find bar.
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 1eb0161b..87ca2614 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -404,6 +404,10 @@ static void setupUserInterface_Window(iWindow *d) {
404 iSidebarWidget *sidebar = new_SidebarWidget(); 404 iSidebarWidget *sidebar = new_SidebarWidget();
405 addChildPos_Widget(content, iClob(sidebar), front_WidgetAddPos); 405 addChildPos_Widget(content, iClob(sidebar), front_WidgetAddPos);
406 } 406 }
407 /* Lookup results. */ {
408 iLookupWidget *lookup = new_LookupWidget();
409 addChildFlags_Widget(div, iClob(lookup), fixedPosition_WidgetFlag | hidden_WidgetFlag);
410 }
407 /* Search bar. */ { 411 /* Search bar. */ {
408 iWidget *searchBar = new_Widget(); 412 iWidget *searchBar = new_Widget();
409 setId_Widget(searchBar, "search"); 413 setId_Widget(searchBar, "search");
@@ -414,7 +418,8 @@ static void setupUserInterface_Window(iWindow *d) {
414 addChild_Widget(div, iClob(searchBar)); 418 addChild_Widget(div, iClob(searchBar));
415 setBackgroundColor_Widget(searchBar, uiBackground_ColorId); 419 setBackgroundColor_Widget(searchBar, uiBackground_ColorId);
416 setCommandHandler_Widget(searchBar, handleSearchBarCommands_); 420 setCommandHandler_Widget(searchBar, handleSearchBarCommands_);
417 addChild_Widget(searchBar, iClob(new_LabelWidget("\U0001f50d Text", 0, 0, NULL))); 421 addChildFlags_Widget(
422 searchBar, iClob(new_LabelWidget("\U0001f50d Text", 0, 0, NULL)), frameless_WidgetFlag);
418 iInputWidget *input = new_InputWidget(0); 423 iInputWidget *input = new_InputWidget(0);
419 setId_Widget(addChildFlags_Widget(searchBar, iClob(input), expand_WidgetFlag), 424 setId_Widget(addChildFlags_Widget(searchBar, iClob(input), expand_WidgetFlag),
420 "find.input"); 425 "find.input");
@@ -422,8 +427,6 @@ static void setupUserInterface_Window(iWindow *d) {
422 addChild_Widget(searchBar, iClob(newIcon_LabelWidget(" \u2b9d ", 'g', KMOD_PRIMARY | KMOD_SHIFT, "find.prev"))); 427 addChild_Widget(searchBar, iClob(newIcon_LabelWidget(" \u2b9d ", 'g', KMOD_PRIMARY | KMOD_SHIFT, "find.prev")));
423 addChild_Widget(searchBar, iClob(newIcon_LabelWidget("\u2a2f", SDLK_ESCAPE, 0, "find.close"))); 428 addChild_Widget(searchBar, iClob(newIcon_LabelWidget("\u2a2f", SDLK_ESCAPE, 0, "find.close")));
424 } 429 }
425 iLookupWidget *lookup = new_LookupWidget();
426 addChildFlags_Widget(d->root, iClob(lookup), fixedPosition_WidgetFlag | hidden_WidgetFlag);
427 iWidget *tabsMenu = makeMenu_Widget(d->root, 430 iWidget *tabsMenu = makeMenu_Widget(d->root,
428 (iMenuItem[]){ 431 (iMenuItem[]){
429 { "Close Tab", 0, 0, "tabs.close" }, 432 { "Close Tab", 0, 0, "tabs.close" },