diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2012-12-14 08:07:21 -0300 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2012-12-14 08:07:21 -0300 |
commit | fb51b13def5271ad643f18de5e7c4cb8d32228f6 (patch) | |
tree | d433e389003a4df3e87b6e78d2f1f9024421f006 /src | |
parent | 6442d8c2cdae9addb0012fe9b79375f459f500bf (diff) |
Update focus priority number for tabs opened in background
There're two options: update the focus number so when you close
the current tab, focus goes to the last background-opened tab
(as with this patch), or to leave it low so when you close the
current tab, focus goes to the previous non-background tab.
Diffstat (limited to 'src')
-rw-r--r-- | src/uicmd.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc index 20d32519..de90748f 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -289,9 +289,15 @@ UI *CustTabs::add_new_tab(UI *old_ui, int focus) if (focus) { switch_tab(btn); - } else if (num_tabs() == 2) { - // no focus and tabbar added: redraw current page - Wizard->redraw(); + } else { // no focus + // set focus counter + increase_focus_counter(); + btn->focus_num(focus_counter); + + if (num_tabs() == 2) { + // tabbar added: redraw current page + Wizard->redraw(); + } } if (num_tabs() == 1) btn->hide(); |