summaryrefslogtreecommitdiff
path: root/kde/window-decorator/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kde/window-decorator/window.cpp')
-rw-r--r--kde/window-decorator/window.cpp40
1 files changed, 18 insertions, 22 deletions
diff --git a/kde/window-decorator/window.cpp b/kde/window-decorator/window.cpp
index 6b4b6031..69d23ad3 100644
--- a/kde/window-decorator/window.cpp
+++ b/kde/window-decorator/window.cpp
@@ -1377,36 +1377,32 @@ KWD::Window::updateProperty (void)
if (mType == Normal || mType == Switcher)
{
- int topXOffset = w / 2;
+ int topXOffset = w / 2;
+ QWidget *widget = mDecor->widget ();
+ int x;
- if (mDecor)
- {
- QWidget *widget = mDecor->widget ();
- int x;
+ x = w - mContext.left_space - mContext.left_corner_space;
+ if (x > topXOffset)
+ topXOffset = x;
- x = w - mContext.left_space - mContext.left_corner_space;
- if (x > topXOffset)
- topXOffset = x;
+ if (widget)
+ {
+ const QObjectList *children = widget->children ();
- if (widget)
+ if (children)
{
- const QObjectList *children = widget->children ();
+ QWidget *child;
- if (children)
+ for (QObjectListIt it(*children); it.current (); ++it)
{
- QWidget *child;
-
- for (QObjectListIt it(*children); it.current (); ++it)
- {
- if (!it.current ()->isWidgetType ())
- continue;
+ if (!it.current ()->isWidgetType ())
+ continue;
- child = static_cast <QWidget *> (it.current ());
+ child = static_cast <QWidget *> (it.current ());
- x = child->x () - mBorder.left - 2;
- if (x > w / 2 && x < topXOffset)
- topXOffset = x;
- }
+ x = child->x () - mBorder.left - 2;
+ if (x > w / 2 && x < topXOffset)
+ topXOffset = x;
}
}
}