diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2012-11-08 08:48:38 -0300 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2012-11-08 08:48:38 -0300 |
commit | e771ffa187fad28f815a973288f462adf0509797 (patch) | |
tree | 10c3bc6c6154ee49fa224c99a7c8084e78a52cf9 /src | |
parent | 2f9834507ff751f177c6fa218cc5849107a61aa8 (diff) |
Set lowest focus priority as default for new unfocused tabs
This also avoids a valgrind uninitialized focus number warning for new tabs.
Diffstat (limited to 'src')
-rw-r--r-- | src/uicmd.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc index bf4bbe2f..40279a60 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -84,7 +84,7 @@ class CustTabButton : public Fl_Button { // active one (the highest numbered gets focus). public: CustTabButton (int x,int y,int w,int h, const char* label = 0) : - Fl_Button (x,y,w,h,label) { ui_ = NULL; }; + Fl_Button (x,y,w,h,label) { ui_ = NULL; focus_num_ = 0; }; void ui(UI *pui) { ui_ = pui; } UI *ui(void) { return ui_; } void focus_num(uint_t fn) { focus_num_ = fn; } @@ -290,8 +290,6 @@ UI *CustTabs::add_new_tab(UI *old_ui, int focus) if (focus) { switch_tab(btn); } else if (num_tabs() == 2) { - increase_focus_counter(); - btn->focus_num(focus_counter); // no focus and tabbar added: redraw current page Wizard->redraw(); } |