diff --git a/layers.cpp b/layers.cpp index 87be47914c..88f6e12dc2 100644 --- a/layers.cpp +++ b/layers.cpp @@ -392,8 +392,11 @@ void Workspace::restackClientUnderActive( Client* c ) { if( Client::belongToSameApplication( active_client, *it )) { - unconstrained_stacking_order.remove( c ); - unconstrained_stacking_order.insert( it, c ); + if( *it != c ) + { + unconstrained_stacking_order.remove( c ); + unconstrained_stacking_order.insert( it, c ); + } break; } }