changeset 1956:76ed17497099

Fix for redraw problem when closing a non-focused tab (with tabs=2)
author Jorge Arellano Cid <jcid@dillo.org>
date Wed, 30 Mar 2011 16:03:40 -0300
parents 3066d77f278e
children 2ac2b0e6aced
files src/uicmd.cc
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/uicmd.cc	Thu Mar 24 21:18:56 2011 -0300
+++ b/src/uicmd.cc	Wed Mar 30 16:03:40 2011 -0300
@@ -231,10 +231,14 @@
    int idx = get_btn_idx(ui);
    btn = (CustTabButton*)child(idx);
    idx > 1 ? prev_tab() : next_tab();
+
+   // WORKAROUND: with two tabs, closing the non-focused one, doesn't
+   // delete it from screen. This hide() call makes it work.  --Jcid
+   btn->hide();
+
    remove(idx);
    delete btn;
    rearrange();
-   //TODO: redraw doesn't work sometimes
    redraw();
 
    Wizard->remove(ui);
@@ -456,7 +460,6 @@
 
    MSG("a_UIcmd_close_bw\n");
    a_Bw_stop_clients(bw, BW_Root + BW_Img + BW_Force);
-   //TODO: sometimes this call segfaults upon exit
    delete(layout);
    if (ui->tabs()) {
       ui->tabs()->remove_tab(ui);