diff --git a/0256-fix-recursive-backingstore-sync-crash.diff b/0256-fix-recursive-backingstore-sync-crash.diff new file mode 100644 index 0000000..409ae8f --- /dev/null +++ b/0256-fix-recursive-backingstore-sync-crash.diff @@ -0,0 +1,40 @@ +qt-bugs@ issue : N227209 +Trolltech task ID : none yet +bugs.kde.org number : 174065 +applied: yes +author: Szymon Tomasz Stefanek + +This patch fixes a crash deep inside the qt painting engine. + +The toplevel shared painter is instantiated by the topmost window +which "owns" the backingstore buffer. The topmost window then recursively +asks the children to paint themselves with the shared painter. +With certain widget hierarchies it turns out that the topmost window +may be asked to paint itself deep inside the recursive painting stack: +a sort of "hierarchy-looping recursion". +The window will do the job and then happily destroy the shared +painter leaving the outer stack frames with a dangling pointer. + +This patch stops the "looping recursion" when it's triggered +with a shared painter already active. The bug doesn't seem to +be present in qt 4.5 snapshots, but in the meantime we need this fix. + + +Index: src/gui/painting/qbackingstore.cpp +=================================================================== +--- src/gui/painting/qbackingstore.cpp (revision 879741) ++++ src/gui/painting/qbackingstore.cpp (working copy) +@@ -987,8 +987,12 @@ + return; + } + +- if (tlw->updatesEnabled()) { ++ // With certain widget hierarchies we may end up being called recursively ++ // on the same toplevel. This is likely to explode once the painter is released ++ // in the code below (since there is no reference counting). Avoid it. ++ bool alreadyPainting = tlwExtra->sharedPainter && tlwExtra->sharedPainter->isActive(); + ++ if (tlw->updatesEnabled() && !alreadyPainting) { + // hw: XXX the toClean region is not correct if !dirtyWidgets.isEmpty() + + // Pre render config diff --git a/qt-x11-opensource-src-4.4.1-systray.patch b/qt-x11-opensource-src-4.4.1-systray.patch deleted file mode 100644 index f2e2563..0000000 --- a/qt-x11-opensource-src-4.4.1-systray.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- qt/src/gui/kernel/qwidget.cpp 2008-08-01 16:08:30.000000000 +0100 -+++ qt/src/gui/kernel/qwidget.cpp 2008-08-05 11:22:40.000000000 +0100 -@@ -9095,8 +9095,6 @@ - break; - #endif - case Qt::WA_NativeWindow: -- if (!qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings) && parentWidget()) -- parentWidget()->d_func()->enforceNativeChildren(); - if (on && !internalWinId() && testAttribute(Qt::WA_WState_Created)) - d->createWinId(); - break; diff --git a/qt.spec b/qt.spec index 7afb336..db978c5 100644 --- a/qt.spec +++ b/qt.spec @@ -46,6 +46,7 @@ Source1: qt-copy-patches-svn_checkout.sh %{?qt_copy:Source2: qt-copy-patches-%{qt_copy}svn.tar.bz2} %{?qt_copy:Provides: qt-copy = %{qt_copy}} %{?qt_copy:Provides: qt4-copy = %{qt_copy}} +Patch100: 0256-fix-recursive-backingstore-sync-crash.diff Source11: qt4.sh Source12: qt4.csh @@ -274,6 +275,8 @@ echo "0242" >> patches/DISABLED echo "0250" >> patches/DISABLED echo "0251" >> patches/DISABLED test -x apply_patches && ./apply_patches +%else +%patch100 -p0 %endif # don't use -b on mkspec files, else they get installed too.