diff options
author | Michael Cardell Widerkrantz <mc@hack.org> | 2011-06-23 07:43:05 +0200 |
---|---|---|
committer | Michael Cardell Widerkrantz <mc@hack.org> | 2011-06-23 07:43:05 +0200 |
commit | 8c70f3eb08a0d79e7766372f287f0a401c3da5c9 (patch) | |
tree | b09b59322888685a69d844ccac26d8003f297e4b /mcwm.c | |
parent | 79340e9afda80e0c064163fb07d179e74aa1d142 (diff) | |
download | mcwm-8c70f3eb08a0d79e7766372f287f0a401c3da5c9.zip |
When forgetting about a client, forget about it on *all* workspaces it
might be on. If fixed, it's now on all of them.
Diffstat (limited to 'mcwm.c')
-rw-r--r-- | mcwm.c | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -755,14 +755,26 @@ uint32_t getcolor(const char *colstr) /* Forget everything about client client. */ void forgetclient(struct client *client) { + uint32_t ws; + if (NULL == client) { PDEBUG("forgetclient: client was NULL\n"); return; } - - /* Delete window from workspace list. */ - delfromworkspace(client, curws); + + /* + * Delete this client from whatever workspace lists it belongs to. + * Note that it's OK to be on several workspaces at once even if + * you're not fixed. + */ + for (ws = 0; ws < WORKSPACES; ws ++) + { + if (NULL != client->wsitem[ws]) + { + delfromworkspace(client, ws); + } + } /* Remove from global window list. */ freeitem(&winlist, NULL, client->winitem); @@ -3879,8 +3891,8 @@ void events(void) } forgetclient(client); - - break; + /* We're finished. Break out of for loop. */ + break; } } /* for */ } |