diff --git a/tabbox.cpp b/tabbox.cpp index 9ff6609dab..b4eeca865b 100644 --- a/tabbox.cpp +++ b/tabbox.cpp @@ -161,6 +161,8 @@ Client* TabBox::currentClient() { if ( mode() != WindowsMode ) return 0; + if (!workspace()->hasClient( client )) + return 0; return client; } diff --git a/workspace.cpp b/workspace.cpp index f108547638..b19a67186c 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -736,6 +736,7 @@ bool Workspace::destroyClient( Client* c) return FALSE; storeFakeSessionInfo( c ); + if (clients.contains(c)) removeClient(c); @@ -752,6 +753,10 @@ bool Workspace::destroyClient( Client* c) if ( c == last_active_client ) last_active_client = 0; delete c; + + if (tab_grab) + tab_box->repaint(); + updateClientArea(); return TRUE; }