Remapping fix, if a client is destroyed. - ttabbed - Simple tabbing application for X11.
       
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 552655a296b62089dd99d065d8da448d499994b7
 (DIR) parent b5775f9b38670516a45adb238df728f8ff8d60c5
 (HTM) Author: Christoph Lohmann <20h@r-36.net>
       Date:   Mon,  5 Jun 2017 02:37:01 +0200
       
       Remapping fix, if a client is destroyed.
       
       Diffstat:
         tabbed.c                            |       9 ++++++---
       
       1 file changed, 6 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/tabbed.c b/tabbed.c
       @@ -886,10 +886,13 @@ propertynotify(const XEvent *e)
        void
        reembedclients(void)
        {
       -        for (int c = 0; c < nclients; c++) {
       +        int c;
       +
       +        for (c = 0; c < nclients; c++) {
                        embedwindow(clients[c]->win);
       -                clients[c]->remapped = 2;
       +                clients[c]->remapped = 3;
                }
       +
                focus(sel);
        }
        
       @@ -1221,9 +1224,9 @@ unmapnotify(const XEvent *e)
                int c;
        
                if ((c = getclient(ev->window)) > -1) {
       +                clients[c]->remapped--;
                        if (clients[c]->remapped == 0)
                                unmanage(c);
       -                clients[c]->remapped--;
                }
        }