diff --git a/clients/ozone/oxygenclient.cpp b/clients/ozone/oxygenclient.cpp index e260057845..04e679c4ae 100644 --- a/clients/ozone/oxygenclient.cpp +++ b/clients/ozone/oxygenclient.cpp @@ -127,7 +127,7 @@ bool OxygenClient::decorationBehaviour(DecorationBehaviour behaviour) const int OxygenClient::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCommonDecorationButton *btn) const { - bool maximized = maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows(); + bool maximized = isMaximized(); int frameWidth = OxygenFactory::borderSize(); switch (lm) { @@ -289,6 +289,11 @@ QColor OxygenClient::titlebarTextColor(const QPalette &palette) } } +bool OxygenClient::isMaximized() const +{ + return maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows(); +} + void OxygenClient::paintEvent(QPaintEvent *e) { Q_UNUSED(e) @@ -332,7 +337,7 @@ void OxygenClient::paintEvent(QPaintEvent *e) // draw shadow - if (compositingActive()) + if (compositingActive() && !isMaximized()) shadowTiles(color,KDecoration::options()->color(ColorTitleBar), SHADOW_WIDTH, isActive())->render( frame.adjusted(-SHADOW_WIDTH+4, -SHADOW_WIDTH+4, SHADOW_WIDTH-4, SHADOW_WIDTH-4), @@ -414,9 +419,7 @@ void OxygenClient::paintEvent(QPaintEvent *e) } // Draw shadows of the frame - bool maximized = maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows(); - - if(maximized) + if(isMaximized()) return; helper_.drawFloatFrame(&painter, frame, color, !compositingActive(), isActive(), @@ -469,9 +472,7 @@ void OxygenClient::drawStripes(QPainter *p, QPalette &palette, const int start, void OxygenClient::updateWindowShape() { - bool maximized = maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows(); - - if(maximized || compositingActive()) { + if(isMaximized() || compositingActive()) { clearMask(); return; } diff --git a/clients/ozone/oxygenclient.h b/clients/ozone/oxygenclient.h index 0daef69e50..9fc1a368a4 100644 --- a/clients/ozone/oxygenclient.h +++ b/clients/ozone/oxygenclient.h @@ -67,6 +67,7 @@ private: void paintEvent(QPaintEvent *e); void drawStripes(QPainter *p, QPalette &palette, const int start, const int end, const int topMargin); QColor titlebarTextColor(const QPalette &palette); + bool isMaximized() const; bool colorCacheInvalid_; QColor cachedTitlebarTextColor_;