diff '--width=116' -dru xfwm4-4.12.3/src/focus.c xfwm4-4.12.3/src/focus.c --- xfwm4-4.12.3/src/focus.c 2015-05-15 14:25:56.000000000 +0200 +++ xfwm4-4.12.3/src/focus.c 2015-07-04 18:55:34.066066582 +0200 @@ -481,7 +481,7 @@ void clientUpdateFocus (ScreenInfo *screen_info, Client * c, unsigned short flags) { - Client *c2; + Client *c2, *prev_top; TRACE ("entering clientUpdateFocus"); @@ -501,10 +501,17 @@ } client_focus = c; - if (c2) + prev_top = screen_info->windows_stack->data; + if (prev_top != c) + { + clientSetNetState (c); + clientAdjustFullscreenLayer (prev_top, FALSE); + frameQueueDraw (prev_top, FALSE); + clientUpdateOpacity (prev_top); + } + if (c2 && c2 != prev_top) { clientSetNetState (c2); - clientAdjustFullscreenLayer (c2, FALSE); frameQueueDraw (c2, FALSE); clientUpdateOpacity (c2); }