diff --git a/clients/laptop/laptopclient.cpp b/clients/laptop/laptopclient.cpp index 067530e46c..821754d420 100644 --- a/clients/laptop/laptopclient.cpp +++ b/clients/laptop/laptopclient.cpp @@ -424,18 +424,7 @@ void LaptopClient::init() void LaptopClient::slotMaximize() { - 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 LaptopClient::resizeEvent(QResizeEvent* e) diff --git a/clients/laptop/laptopclient.h b/clients/laptop/laptopclient.h index d6211fcd71..c6256a47c0 100644 --- a/clients/laptop/laptopclient.h +++ b/clients/laptop/laptopclient.h @@ -29,7 +29,7 @@ public: void setBitmap(const unsigned char *bitmap); void reset(); QSize sizeHint() const; - int last_button; + ButtonState last_button; protected: void mousePressEvent( QMouseEvent* e )