correctly align tabbing shade mode, including hover
REVIEW: 106258 BUG: 294410 FIXED-IN: 4.9.2
This commit is contained in:
parent
9f8228bb1c
commit
3b7c1fb69d
2 changed files with 10 additions and 6 deletions
12
client.cpp
12
client.cpp
|
@ -1071,6 +1071,11 @@ void Client::setShade(ShadeMode mode)
|
|||
bool was_shade = isShade();
|
||||
ShadeMode was_shade_mode = shade_mode;
|
||||
shade_mode = mode;
|
||||
|
||||
// Update states of all other windows in this group
|
||||
if (tabGroup())
|
||||
tabGroup()->updateStates(this, TabGroup::Shaded);
|
||||
|
||||
if (was_shade == isShade()) {
|
||||
if (decoration != NULL) // Decoration may want to update after e.g. hover-shade changes
|
||||
decoration->shadeChange();
|
||||
|
@ -1148,9 +1153,6 @@ void Client::setShade(ShadeMode mode)
|
|||
decoration->shadeChange();
|
||||
updateWindowRules(Rules::Shade);
|
||||
|
||||
// Update states of all other windows in this group
|
||||
if (tabGroup())
|
||||
tabGroup()->updateStates(this, TabGroup::Shaded);
|
||||
emit shadeChanged();
|
||||
}
|
||||
|
||||
|
@ -1162,7 +1164,9 @@ void Client::shadeHover()
|
|||
|
||||
void Client::shadeUnhover()
|
||||
{
|
||||
setShade(ShadeNormal);
|
||||
if (!tabGroup() || tabGroup()->current() == this ||
|
||||
tabGroup()->current()->shadeMode() == ShadeNormal)
|
||||
setShade(ShadeNormal);
|
||||
cancelShadeHoverTimer();
|
||||
}
|
||||
|
||||
|
|
|
@ -326,8 +326,8 @@ void TabGroup::updateStates(Client* main, States states, Client* only)
|
|||
if ((states & Maximized) && c->maximizeMode() != main->maximizeMode())
|
||||
c->maximize(main->maximizeMode());
|
||||
// the order Shaded -> Geometry is somewhat important because one will change the other
|
||||
if ((states & Shaded) && c->isShade() != main->isShade())
|
||||
c->setShade(main->isShade() ? ShadeNormal : ShadeNone);
|
||||
if ((states & Shaded))
|
||||
c->setShade(main->shadeMode());
|
||||
if ((states & Geometry) && c->geometry() != main->geometry())
|
||||
c->setGeometry(main->geometry());
|
||||
if (states & Desktop) {
|
||||
|
|
Loading…
Reference in a new issue