From 5cef676ab863c160c4ea47271e9b4da1e6ef55d1 Mon Sep 17 00:00:00 2001 From: Sandro Giessl Date: Sun, 25 Jul 2004 10:46:16 +0000 Subject: [PATCH] use new maximize() overload svn path=/trunk/kdebase/kwin/; revision=332509 --- clients/quartz/quartz.cpp | 15 +++------------ clients/quartz/quartz.h | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/clients/quartz/quartz.cpp b/clients/quartz/quartz.cpp index a4c266d14b..b0e5d6b106 100644 --- a/clients/quartz/quartz.cpp +++ b/clients/quartz/quartz.cpp @@ -330,7 +330,8 @@ QValueList< QuartzHandler::BorderSize > QuartzHandler::borderSizes() const QuartzButton::QuartzButton(QuartzClient *parent, const char *name, bool largeButton, bool isLeftButton, bool isOnAllDesktopsButton, const unsigned char *bitmap, const QString& tip, const int realizeBtns) - : QButton(parent->widget(), name) + : QButton(parent->widget(), name), + last_button(NoButton) { setTipText(tip); setCursor(ArrowCursor); @@ -674,17 +675,7 @@ void QuartzClient::slotMaximize() { if (button[BtnMax]) { - switch (button[BtnMax]->last_button) - { - case MidButton: - maximize(maximizeMode() ^ MaximizeVertical ); - break; - case RightButton: - maximize(maximizeMode() ^ MaximizeHorizontal ); - break; - default: - maximize(maximizeMode() == MaximizeFull ? MaximizeRestore : MaximizeFull ); - } + maximize(button[BtnMax]->last_button); } } diff --git a/clients/quartz/quartz.h b/clients/quartz/quartz.h index 44794b118e..e7ea92647c 100644 --- a/clients/quartz/quartz.h +++ b/clients/quartz/quartz.h @@ -57,7 +57,7 @@ class QuartzButton : public QButton void setBitmap(const unsigned char *bitmap); void setTipText(const QString &tip); QSize sizeHint() const; - int last_button; + ButtonState last_button; void turnOn( bool isOn ); protected: