From 6e02338328cdbe0f5b75b694ad29e78359950563 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Thu, 21 Dec 2006 14:50:46 +0000 Subject: [PATCH] * ctor: change viewport attribute (disable double-buffering). * 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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt4/GuiWorkArea.C b/src/frontends/qt4/GuiWorkArea.C index 8e87582262..497a2e22e7 100644 --- a/src/frontends/qt4/GuiWorkArea.C +++ b/src/frontends/qt4/GuiWorkArea.C @@ -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(); } -- 2.39.2