Fixed maximized border handling.

svn path=/trunk/kdebase/kwin/; revision=333557
This commit is contained in:
Luciano Montanaro 2004-07-28 16:44:42 +00:00
parent 19d92946a2
commit 06fa4c69bd
2 changed files with 11 additions and 3 deletions

View file

@ -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() void B2Client::iconChange()
{ {
if (button[BtnMenu]) if (button[BtnMenu])
button[BtnMenu]->repaint(false); button[BtnMenu]->repaint(false);
} }
// Gallium: New button show/hide magic for customizable // Gallium: New button show/hide magic for customizable
// button positions. // button positions.
void B2Client::calcHiddenButtons() void B2Client::calcHiddenButtons()
@ -745,7 +754,6 @@ KDecoration::Position B2Client::mousePosition(const QPoint& p) const
return KDecoration::mousePosition(p); return KDecoration::mousePosition(p);
} }
void B2Client::titleMoveAbs(int new_ofs) void B2Client::titleMoveAbs(int new_ofs)
{ {
if (new_ofs < 0) new_ofs = 0; if (new_ofs < 0) new_ofs = 0;

View file

@ -131,7 +131,7 @@ private:
B2Titlebar* tb, QBoxLayout* titleLayout); B2Titlebar* tb, QBoxLayout* titleLayout);
void positionButtons(); void positionButtons();
void calcHiddenButtons(); void calcHiddenButtons();
bool mustDrawHandle() const { return draw_handle && isResizable(); } bool mustDrawHandle() const;
enum ButtonType{BtnMenu=0, BtnSticky, BtnIconify, BtnMax, BtnClose, enum ButtonType{BtnMenu=0, BtnSticky, BtnIconify, BtnMax, BtnClose,
BtnHelp, BtnShade, BtnResize, BtnCount}; BtnHelp, BtnShade, BtnResize, BtnCount};