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) void Client::setMaximize(bool vertically, bool horizontally)
{ {
// changeMaximize() flips the state, so change from set->flip // changeMaximize() flips the state, so change from set->flip
MaximizeMode oldMode = maximizeMode();
changeMaximize( changeMaximize(
max_mode & MaximizeVertical ? !vertically : vertically, max_mode & MaximizeVertical ? !vertically : vertically,
max_mode & MaximizeHorizontal ? !horizontally : horizontally, max_mode & MaximizeHorizontal ? !horizontally : horizontally,
false); false);
emit clientMaximizedStateChanged(this, max_mode); if (oldMode != maximizeMode()) {
emit clientMaximizedStateChanged(this, vertically, horizontally); emit clientMaximizedStateChanged(this, max_mode);
emit clientMaximizedStateChanged(this, vertically, horizontally);
}
} }