set / withdraw iconic state for shaded clients

Should shaded windows be iconic?
I don't know. Apparently nobody does. (google found me discussions but no conclusion)

OpenBox, Metacity and Compiz set shaded Windows iconic, Sawfish and IceWM don't.

Either way kwin presently sets shaded windows iconic when you map them (client.cpp, void Client::map(allowed_t)) so to remain consistent with ourselves and half of the other WMs i set it.
Otherwise it should not be set when unshading a window
(no justification but noteworthy: the bug reporter seems to intend to pause expensive painting when the window is iconic and in that regard it's oc better to have it for shaded windows)

BUG: 317025
FIXED-IN: 4.11
REVIEW: 109593
This commit is contained in:
Thomas Lübking 2013-03-19 22:00:05 +01:00
parent d6c652fd35
commit eab1166dbc

View file

@ -982,6 +982,7 @@ void Client::setShade(ShadeMode mode)
XUnmapWindow(display(), wrapper);
XUnmapWindow(display(), client);
XSelectInput(display(), wrapper, ClientWinMask | SubstructureNotifyMask);
exportMappingState(IconicState);
plainResize(s);
shade_geometry_change = false;
if (was_shade_mode == ShadeHover) {
@ -1017,6 +1018,7 @@ void Client::setShade(ShadeMode mode)
}
XMapWindow(display(), wrapperId());
XMapWindow(display(), window());
exportMappingState(NormalState);
if (isActive())
workspace()->requestFocus(this);
}