From 4f396b03eb06f2f441615ab6c56f2c3ae43e8590 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 30 Jul 2011 03:22:42 +0000 Subject: Fix the "redmond" kwin client It is highly recommended that "window resize and move when maximized" be disabled when this client is in use git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1243970 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kwin/lib/kcommondecoration.cpp | 2 ++ kwin/lib/kcommondecoration.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'kwin/lib') diff --git a/kwin/lib/kcommondecoration.cpp b/kwin/lib/kcommondecoration.cpp index 556e20c9e..d3d43ce12 100644 --- a/kwin/lib/kcommondecoration.cpp +++ b/kwin/lib/kcommondecoration.cpp @@ -97,6 +97,7 @@ int KCommonDecoration::layoutMetric(LayoutMetric lm, bool, const KCommonDecorati return 5; case LM_ButtonMarginTop: + case LM_RightButtonsMarginTop: return 0; case LM_ExplicitButtonSpacer: @@ -212,6 +213,7 @@ void KCommonDecoration::updateLayout() const } if (m_buttonsRight.count() > 0) { + int y = r_y + layoutMetric(LM_TitleEdgeTop) + layoutMetric(LM_ButtonMarginTop) + layoutMetric(LM_RightButtonsMarginTop); const int titleEdgeRightLeft = r_x2-layoutMetric(LM_TitleEdgeRight)+1; const int buttonSpacing = layoutMetric(LM_ButtonSpacing); diff --git a/kwin/lib/kcommondecoration.h b/kwin/lib/kcommondecoration.h index ff720ab91..8126445ad 100644 --- a/kwin/lib/kcommondecoration.h +++ b/kwin/lib/kcommondecoration.h @@ -113,7 +113,8 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration LM_ButtonHeight, LM_ButtonSpacing, LM_ExplicitButtonSpacer, - LM_ButtonMarginTop + LM_ButtonMarginTop, + LM_RightButtonsMarginTop }; enum DecorationBehaviour -- cgit v1.2.1