From 9fc92314831e8806e2d162dfabe71dab870148fb Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Mon, 10 Sep 2007 19:09:39 +0000 Subject: [PATCH] Set palette's currentColorGroup since apparently kwin doesn't give us one with the right color group. This fixes the bug where the oxygen windeco always uses the inactive colors. Is this something that can be fixed in kwin? CCMAIL: kwin@kde.org svn path=/trunk/KDE/kdebase/workspace/; revision=710741 --- clients/oxygen/oxygenclient.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index cd92fa260a..516340bd94 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -14,10 +14,8 @@ #include #include -#include #include #include -#include #include #include @@ -460,6 +458,15 @@ void OxygenClient::paintEvent(QPaintEvent *e) QPalette palette = widget()->palette(); QPainter painter(widget()); + // ### - This feels like a kwin bug; the palette we get back always seems + // to be (incorrectly) using the Inactive group, which is wrong; active + // windows should have currentColorGroup() == Active. So, hack around it... + // I don't think a window can be disabled? + if (isActive()) + palette.setCurrentColorGroup(QPalette::Active); + else + palette.setCurrentColorGroup(QPalette::Inactive); + QRect title(titlebar_->geometry()); int x,y,w,h;