diff options
author | Ana Beatriz Guerrero Lopez <ana@debian.org> | 2009-02-18 00:02:37 +0000 |
---|---|---|
committer | Ana Beatriz Guerrero Lopez <ana@debian.org> | 2009-02-18 00:02:37 +0000 |
commit | 9f72af579a1d31c2ac9572b9b1fb94345ce5043a (patch) | |
tree | b084fb0ff03bac29430b5f2213dd19b06614d2f2 /debian/patches/0256-fix-recursive-backingstore-sync-crash.diff | |
parent | 9a2df626010f7cbccdc812aec07172e0ebd2d128 (diff) | |
parent | 27f5b1f4b636b2efd947f3535f056714d32daa02 (diff) | |
download | qt4-x11-9f72af579a1d31c2ac9572b9b1fb94345ce5043a.tar.gz |
moved stuff from trunk/
Diffstat (limited to 'debian/patches/0256-fix-recursive-backingstore-sync-crash.diff')
-rw-r--r-- | debian/patches/0256-fix-recursive-backingstore-sync-crash.diff | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/0256-fix-recursive-backingstore-sync-crash.diff b/debian/patches/0256-fix-recursive-backingstore-sync-crash.diff new file mode 100644 index 0000000..9665d5a --- /dev/null +++ b/debian/patches/0256-fix-recursive-backingstore-sync-crash.diff @@ -0,0 +1,38 @@ +qt-bugs@ issue : N227209 +Trolltech task ID : none yet +bugs.kde.org number : 174065 +applied: yes +author: Szymon Tomasz Stefanek <s.stefanek@gmail.com> + +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. + + +--- a/src/gui/painting/qbackingstore.cpp ++++ b/src/gui/painting/qbackingstore.cpp +@@ -988,8 +988,12 @@ void QWidgetBackingStore::cleanRegion(co + 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 |