Always use PositionCenter for maximized windows

It was showing the resize cursor at the top title edge which is not
wanted in maximized mode.
This commit is contained in:
Martin Gräßlin 2013-09-30 12:46:21 +02:00
parent 0fb259058b
commit 0ec8646d78

View file

@ -407,7 +407,7 @@ KDecorationDefines::Position AuroraeClient::mousePosition(const QPoint &point) c
{ {
// based on the code from deKorator // based on the code from deKorator
int pos = PositionCenter; int pos = PositionCenter;
if (isShade()) { if (isShade() || isMaximized()) {
return Position(pos); return Position(pos);
} }
@ -415,9 +415,8 @@ KDecorationDefines::Position AuroraeClient::mousePosition(const QPoint &point) c
borders(borderLeft, borderRight, borderTop, borderBottom); borders(borderLeft, borderRight, borderTop, borderBottom);
int paddingLeft, paddingTop, paddingRight, paddingBottom; int paddingLeft, paddingTop, paddingRight, paddingBottom;
padding(paddingLeft, paddingRight, paddingTop, paddingBottom); padding(paddingLeft, paddingRight, paddingTop, paddingBottom);
const bool maximized = maximizeMode() == MaximizeFull && !options()->moveResizeMaximizedWindows();
int titleEdgeLeft, titleEdgeRight, titleEdgeTop, titleEdgeBottom; int titleEdgeLeft, titleEdgeRight, titleEdgeTop, titleEdgeBottom;
AuroraeFactory::instance()->theme()->titleEdges(titleEdgeLeft, titleEdgeTop, titleEdgeRight, titleEdgeBottom, maximized); AuroraeFactory::instance()->theme()->titleEdges(titleEdgeLeft, titleEdgeTop, titleEdgeRight, titleEdgeBottom, false);
switch (AuroraeFactory::instance()->theme()->decorationPosition()) { switch (AuroraeFactory::instance()->theme()->decorationPosition()) {
case DecorationTop: case DecorationTop:
borderTop = titleEdgeTop; borderTop = titleEdgeTop;