Jean-Marc Lasgouttes a écrit :
"Abdel" == Abdel  <[EMAIL PROTECTED]> writes:

Abdel> Michael Gerz a écrit :
Martin, your row signature patch is excellent as it reduces screen
flickering significantly (you could the flicking on Windows with
qtwin).

Abdel> FYI, without this patch (I have not update my cvs yet), my Qt4
Abdel> port has zero flickering :-) I think this patch is solving here
Abdel> a problem which is in the Qt3 frontend. During my port, I have
Abdel> erased all the calls to the "QWidget::repaint" function and I
Abdel> just have one "update" to the screen. In other word, I let Qt
Abdel> decide when to draw.
Concerning flicker, I read that using setBackgroundMode(NoBackground)
on a custom Widget help avoiding clearing the windows first. Is that
true?

I guess so yes. Following patch will do so.


Reference:
http://developer.kde.org/documentation/books/kde-2.0-development/ch09lev1sec2.html

There are also some double bufferning tricks there.

JMarc


Index: QWorkArea.C
===================================================================
RCS file: /var/cvs/lyx/lyx-devel/src/frontends/qt2/QWorkArea.C,v
retrieving revision 1.29
diff -u -r1.29 QWorkArea.C
--- QWorkArea.C 18 Jul 2005 00:29:12 -0000      1.29
+++ QWorkArea.C 4 Jan 2006 11:52:18 -0000
@@ -57,7 +57,10 @@

        content_->show();

-       content_->setBackgroundColor(lcolorcache.get(LColor::background));
+       // It is said that this help reduce flicker
+       content_->setBackgroundMode(NoBackground);
+       // If we go back to a custom backgound call:
+ // content_->setBackgroundColor(lcolorcache.get(LColor::background));

        QHBoxLayout * vl = new QHBoxLayout(this);
        vl->addWidget(content_, 5);

Reply via email to