From 06fa4c69bd148c118f8c8088274341933c2425a0 Mon Sep 17 00:00:00 2001 From: Luciano Montanaro Date: Wed, 28 Jul 2004 16:44:42 +0000 Subject: [PATCH] Fixed maximized border handling. svn path=/trunk/kdebase/kwin/; revision=333557 --- clients/b2/b2client.cpp | 12 ++++++++++-- clients/b2/b2client.h | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/clients/b2/b2client.cpp b/clients/b2/b2client.cpp index 2d0a8e5e7a..43b15e9dc4 100644 --- a/clients/b2/b2client.cpp +++ b/clients/b2/b2client.cpp @@ -496,13 +496,22 @@ void B2Client::addButtons(const QString& s, const QString tips[], } } +bool B2Client::mustDrawHandle() const +{ + bool drawSmallBorders = !options()->moveResizeMaximizedWindows(); + if (drawSmallBorders && (maximizeMode() & MaximizeVertical)) { + return false; + } else { + return draw_handle && isResizable(); + } +} + void B2Client::iconChange() { if (button[BtnMenu]) button[BtnMenu]->repaint(false); } - // Gallium: New button show/hide magic for customizable // button positions. void B2Client::calcHiddenButtons() @@ -745,7 +754,6 @@ KDecoration::Position B2Client::mousePosition(const QPoint& p) const return KDecoration::mousePosition(p); } - void B2Client::titleMoveAbs(int new_ofs) { if (new_ofs < 0) new_ofs = 0; diff --git a/clients/b2/b2client.h b/clients/b2/b2client.h index 4e8ba6b2df..e9bbebbcc5 100644 --- a/clients/b2/b2client.h +++ b/clients/b2/b2client.h @@ -131,7 +131,7 @@ private: B2Titlebar* tb, QBoxLayout* titleLayout); void positionButtons(); void calcHiddenButtons(); - bool mustDrawHandle() const { return draw_handle && isResizable(); } + bool mustDrawHandle() const; enum ButtonType{BtnMenu=0, BtnSticky, BtnIconify, BtnMax, BtnClose, BtnHelp, BtnShade, BtnResize, BtnCount};