From eb647c7489ce2d2b35ffc83cae99e1cfe0b35483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Wed, 26 Jun 2013 19:29:52 +0200 Subject: [PATCH] do not emit maximizeChange if mode didn't change BUG: 321638 FIXED-IN: 4.11 REVIEW: 111262 --- geometry.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index f928649c0e..0176abd42a 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -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); + } }