[ooo-build-commit] .: Branch 'ooo-build-3-2-1' - patches/dev300
Petr Mladek
pmladek at kemper.freedesktop.org
Mon Jun 14 08:21:45 PDT 2010
patches/dev300/apply | 2 +
patches/dev300/kde4-statusbar-redrawing-2.diff | 36 +++++++++++++++++++++++++
2 files changed, 38 insertions(+)
New commits:
commit 3a1b50f81f4ef0716cb9d3bf914cc8e0308614f4
Author: Petr Mladek <pmladek at walk.suse.cz>
Date: Mon Jun 14 17:20:27 2010 +0200
do not crash with non-Oxygen KDE4 theme (bnc#612491, i#109176)
* patches/dev300/kde4-statusbar-redrawing-2.diff:
* patches/dev300/apply: use better border width; check the area size
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 9eeb20a..f53e9e9 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2345,6 +2345,8 @@ kde4-border-frame.diff, i#111464, jholesov
# redraw the status bar when needed; backport from CWS vcl109; fix by pl
kde4-statusbar-redrawing.diff, bnc#567886, i#107945, pmladek
+# do not crash with non-Oxygen theme; use better border width
+kde4-statusbar-redrawing-2.diff, bnc#612491, i#109176, pmladek
[ KDE4Experimental ]
# Not yet ported to co-exist with the KDE3 stuff
diff --git a/patches/dev300/kde4-statusbar-redrawing-2.diff b/patches/dev300/kde4-statusbar-redrawing-2.diff
new file mode 100644
index 0000000..24fe201
--- /dev/null
+++ b/patches/dev300/kde4-statusbar-redrawing-2.diff
@@ -0,0 +1,36 @@
+--- KDESalGraphics.cxx.old 2010-06-14 14:21:03.000000000 +0200
++++ KDESalGraphics.cxx 2010-06-14 17:03:45.000000000 +0200
+@@ -454,15 +454,28 @@ BOOL KDESalGraphics::drawNativeControl(
+ lcl_drawFrame(QStyle::PE_Frame, m_image,
+ vclStateValue2StateFlag(nControlState, value));
+
+- int size = kapp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
++ // draw just the border, see http://qa.openoffice.org/issues/show_bug.cgi?id=107945
++ // FIXME: how to get the actual frame width? QStyle::PM_DefaultFrameWidth is "1" for Oxygen
++ // and the frame is 2 pixels in reality
++ int nFrameWidth = kapp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth) + 1;
+ pTempClipRegion = XCreateRegion();
+ XRectangle xRect = { widgetRect.left(), widgetRect.top(), widgetRect.width(), widgetRect.height() };
+ XUnionRectWithRegion( &xRect, pTempClipRegion, pTempClipRegion );
+ XLIB_Region pSubtract = XCreateRegion();
+- xRect.x += size;
+- xRect.y += size;
+- xRect.width -= 2* size;
+- xRect.height -= 2*size;
++ xRect.x += nFrameWidth;
++ xRect.y += nFrameWidth;
++
++ // do not crash for too small widgets, see http://qa.openoffice.org/issues/show_bug.cgi?id=112102
++ if ( xRect.width > 2*nFrameWidth )
++ xRect.width -= 2*nFrameWidth;
++ else
++ xRect.width = 0;
++
++ if (xRect.height > 2*nFrameWidth)
++ xRect.height -= 2*nFrameWidth;
++ else
++ xRect.height = 0;
++
+ XUnionRectWithRegion( &xRect, pSubtract, pSubtract );
+ XSubtractRegion( pTempClipRegion, pSubtract, pTempClipRegion );
+ XDestroyRegion( pSubtract );
More information about the ooo-build-commit
mailing list