]> git.lyx.org Git - features.git/commitdiff
fix the fix for bug 818. Hopefully. Damn I hate this stuff
authorJohn Levon <levon@movementarian.org>
Tue, 3 Jun 2003 19:32:08 +0000 (19:32 +0000)
committerJohn Levon <levon@movementarian.org>
Tue, 3 Jun 2003 19:32:08 +0000 (19:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7096 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/ChangeLog
src/frontends/lyx_gui.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/lyx_gui.C
src/frontends/qt2/qscreen.C
src/frontends/screen.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/lyx_gui.C

index aff1f50613b6014b87fbed4e8cfee057a11f9720..6001e4226c8c1d4c3f8bbf507d7fd5902d586320 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-03  John Levon  <levon@movementarian.org>
+
+       * lyx_gui.h: add sync_events()
+
+       * screen.C: sync events before showing the cursor
+
 2003-05-08  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * Makefile.am: better lib building
index e42bb9fe6ae418d58220fdf7d01261cb1c788a81..f0b2447a4c866b660c8ffb2b19a1118cb08a2feb 100644 (file)
@@ -53,6 +53,11 @@ void parse_lyxrc();
  */
 void start(string const & batch, std::vector<string> const & files);
 
+/**
+ * Synchronise all pending events.
+ */
+void sync_events();
+
 /**
  * quit running LyX
  */
index 5a1d569d40e0a16f62c9d441916de7d94a04f867..fe4522e8b56941231bfe5023ceed0aebb2a92c08 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-03  John Levon  <levon@movementarian.org>
+
+       * lyx_gui.C: add sync_events()
+       * qscreen.C: remove previous hack for bug 818
+
 2003-06-03  John Levon  <levon@movementarian.org>
 
        * qscreen.C: paint before saving the cursor pixmap
index 870ae4c66c4c8e9cc460ba77e4e40e544d1114fa..b397acf0bdddb96dfeec3b226c3e862f30f2eac1 100644 (file)
@@ -177,6 +177,12 @@ void start(string const & batch, vector<string> const & files)
 }
 
 
+void sync_events()
+{
+       qApp->processEvents();
+}
+
+
 void exit()
 {
        delete lyxserver;
index 0669696b196c0c873af316d9a9fe5a932f3fd592..f5b85dbdab2005a071d2c6ab36e868250012c6ed 100644 (file)
@@ -129,17 +129,12 @@ void QScreen::showCursor(int x, int y, int h, Cursor_Shape shape)
                nocursor_pixmap_.reset(new QPixmap(cursor_w_, cursor_h_));
        }
 
-       // save old area
-       bitBlt(nocursor_pixmap_.get(), 0, 0, owner_.getPixmap(),
-               cursor_x_, cursor_y_, cursor_w_, cursor_h_);
-
        if (!qApp->focusWidget())
                return;
 
-       // We could have pending paints. If we don't process them
-       // before, we end up with pixel dirt when the cursor is
-       // in insets
-       qApp->processEvents();
+       // save old area
+       bitBlt(nocursor_pixmap_.get(), 0, 0, owner_.getPixmap(),
+               cursor_x_, cursor_y_, cursor_w_, cursor_h_);
 
        Painter & pain(owner_.getPainter());
        pain.start();
index 0ec0a0daee28bb867f5362bd379ae41b176baaf0..14baa80f9cc1e670fbee37a50272485ade00c510 100644 (file)
@@ -27,6 +27,7 @@
 #include "rowpainter.h"
 #include "insets/updatableinset.h"
 #include "mathed/formulabase.h"
+#include "lyx_gui.h"
 
 // Splash screen-specific stuff
 #include "lyxfont.h"
@@ -131,6 +132,10 @@ LyXScreen::~LyXScreen()
 
 void LyXScreen::showCursor(BufferView & bv)
 {
+       // this is needed to make sure we copy back the right
+       // pixmap on the hide for the Qt frontend
+       lyx_gui::sync_events();
+
        if (cursor_visible_)
                return;
 
@@ -189,9 +194,8 @@ void LyXScreen::showCursor(BufferView & bv)
        if (y < 0 || y + h > workarea().workHeight())
                return;
 
-       showCursor(x, y, h, shape);
-
        cursor_visible_ = true;
+       showCursor(x, y, h, shape);
 }
 
 
@@ -200,8 +204,8 @@ void LyXScreen::hideCursor()
        if (!cursor_visible_)
                return;
 
-       removeCursor();
        cursor_visible_ = false;
+       removeCursor();
 }
 
 
index 815f560a57354b3b30011e165f7fc044d9a66493..d256e10204c9e86203aac756463065a874772228 100644 (file)
@@ -1,3 +1,7 @@
+2003-06-03  John Levon  <levon@movementarian.org>
+
+       * lyx_gui.C: add sync_events()
+
 2003-06-03  Angus Leeming  <leeming@lyx.org>
 
        * FormGraphics.C (build): a few comments.
index 4c8aeb04f9863a8f7b0813bfa361ad2fd2131b75..cb3849f5392eca46715da6529b105867ba19bbb9 100644 (file)
@@ -325,6 +325,12 @@ void exit()
 }
 
 
+void sync_events()
+{
+       // FIXME
+}
+
+
 FuncStatus getStatus(FuncRequest const & /*ev*/)
 {
        // Nothing interesting to do here