File r912153.diff of Package kdebase4-runtime

Subject: fix switching style from oxygen breaks menus
From: wstephenson@suse.de
Bug: kde#178321
Patch-upstream: 912153
--- kstyles/oxygen/oxygen.cpp	(revision 912152)
+++ kstyles/oxygen/oxygen.cpp	(revision 912153)
@@ -2238,6 +2238,17 @@ void OxygenStyle::polish(QWidget* widget
 
 void OxygenStyle::unpolish(QWidget* widget)
 {
+
+    switch (widget->windowFlags() & Qt::WindowType_Mask) {
+        case Qt::Window:
+        case Qt::Dialog:
+            widget->removeEventFilter(this);
+            break;
+        default:
+            break;
+    }
+
+
     if ( qobject_cast<QProgressBar*>(widget) )
     {
         progAnimWidgets.remove(widget);
@@ -2262,6 +2273,8 @@ void OxygenStyle::unpolish(QWidget* widg
         || qobject_cast<QToolBox*>(widget))
     {
         widget->setBackgroundRole(QPalette::Button);
+        widget->removeEventFilter(this);
+        widget->clearMask();
     }
 
     if (qobject_cast<QScrollBar*>(widget))
@@ -2271,6 +2284,7 @@ void OxygenStyle::unpolish(QWidget* widg
     else if (qobject_cast<QDockWidget*>(widget))
     {
         widget->setContentsMargins(0,0,0,0);
+        widget->clearMask();
     }
     else if (qobject_cast<QToolBox*>(widget))
     {
@@ -2283,6 +2297,7 @@ void OxygenStyle::unpolish(QWidget* widg
         widget->setAttribute(Qt::WA_PaintOnScreen, false);
         widget->setAttribute(Qt::WA_NoSystemBackground, false);
         widget->removeEventFilter(this);
+        widget->clearMask();
     }
     else if (qobject_cast<QFrame*>(widget)
             || qobject_cast<QMdiSubWindow*>(widget))
Index: kstyles/oxygen/oxygen.cpp
===================================================================