]> git.lyx.org Git - lyx.git/commitdiff
* ctor: change viewport attribute (disable double-buffering).
authorAbdelrazak Younes <younes@lyx.org>
Thu, 21 Dec 2006 14:50:46 +0000 (14:50 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 21 Dec 2006 14:50:46 +0000 (14:50 +0000)
* focusInEvent(): start the blinking cursor after the resize.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16366 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiWorkArea.C

index 8e87582262b7ba62f759052d2208e361a0e01a48..497a2e22e734b7242cbcb72bdf4136e00dd58290 100644 (file)
@@ -171,7 +171,10 @@ GuiWorkArea::GuiWorkArea(int w, int h, int id, LyXView & lyx_view)
        setMinimumSize(100, 70);
 
        viewport()->setAutoFillBackground(false);
-       viewport()->setAttribute(Qt::WA_OpaquePaintEvent);
+       // We don't need double-buffering nor SystemBackground on
+       // the viewport because we have our own backing pixmap.
+       viewport()->setAttribute(Qt::WA_NoSystemBackground);
+
        setFocusPolicy(Qt::WheelFocus);
 
        viewport()->setCursor(Qt::IBeamCursor);
@@ -265,8 +268,6 @@ void GuiWorkArea::focusInEvent(QFocusEvent * /*event*/)
        // in BufferList that could be connected to the different tabbars.
        lyx_view_.updateTab();
 
-       startBlinkingCursor();
-
        //FIXME: Use case: Two windows share the same buffer.
        // The first window is resize. This modify the inner Buffer
        // structure because Paragraph has a notion of line break and
@@ -282,6 +283,8 @@ void GuiWorkArea::focusInEvent(QFocusEvent * /*event*/)
        // even though those line breaks are not adapted to the second
        // BufferView width... such is life!
        resizeBufferView();
+
+       startBlinkingCursor();
 }