From f97504d7485116bd255dcc0cc4cd0dc1a6e0bc17 Mon Sep 17 00:00:00 2001 From: Luciano Montanaro Date: Fri, 23 Jul 2004 23:10:19 +0000 Subject: [PATCH] Use new common maximize() method. svn path=/trunk/kdebase/kwin/; revision=332170 --- clients/laptop/laptopclient.cpp | 13 +------------ clients/laptop/laptopclient.h | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) 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 )