diff --git a/clients/b2/b2client.cpp b/clients/b2/b2client.cpp index aa85a3cb94..684b18d758 100644 --- a/clients/b2/b2client.cpp +++ b/clients/b2/b2client.cpp @@ -299,18 +299,7 @@ QValueList< B2ClientFactory::BorderSize > B2ClientFactory::borderSizes() const void B2Client::maxButtonClicked() { - switch (button[BtnMax]->last_button) { - case MidButton: - maximize(maximizeMode() ^ MaximizeVertical); - break; - case RightButton: - maximize(maximizeMode() ^ MaximizeHorizontal); - break; - case LeftButton: - default: - maximize(maximizeMode() == MaximizeFull ? MaximizeRestore : MaximizeFull); - break; - } + maximize(button[BtnMax]->last_button); } void B2Client::shadeButtonClicked() diff --git a/clients/b2/b2client.h b/clients/b2/b2client.h index 313c82ce8d..c298dae238 100644 --- a/clients/b2/b2client.h +++ b/clients/b2/b2client.h @@ -56,7 +56,7 @@ private: public: B2Client* client; - int last_button; + ButtonState last_button; int realizeButtons; bool hover; };