do not emit maximizeChange if mode didn't change

BUG: 321638
FIXED-IN: 4.11
REVIEW: 111262
This commit is contained in:
Thomas Lübking 2013-06-26 19:29:52 +02:00
parent 9694330aa8
commit eb647c7489

View file

@ -2113,12 +2113,15 @@ void Client::maximize(MaximizeMode m)
void Client::setMaximize(bool vertically, bool horizontally)
{
// changeMaximize() flips the state, so change from set->flip
MaximizeMode oldMode = maximizeMode();
changeMaximize(
max_mode & MaximizeVertical ? !vertically : vertically,
max_mode & MaximizeHorizontal ? !horizontally : horizontally,
false);
emit clientMaximizedStateChanged(this, max_mode);
emit clientMaximizedStateChanged(this, vertically, horizontally);
if (oldMode != maximizeMode()) {
emit clientMaximizedStateChanged(this, max_mode);
emit clientMaximizedStateChanged(this, vertically, horizontally);
}
}