fix the fix for bug 818. Hopefully. Damn I hate this stuff

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7096 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2003-06-03 19:32:08 +00:00
parent 77ac7806f2
commit 06c81c0ec4
8 changed files with 42 additions and 11 deletions

View 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

View 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
*/

View 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

View File

@ -177,6 +177,12 @@ void start(string const & batch, vector<string> const & files)
}
void sync_events()
{
qApp->processEvents();
}
void exit()
{
delete lyxserver;

View 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();

View 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();
}

View 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.

View File

@ -325,6 +325,12 @@ void exit()
}
void sync_events()
{
// FIXME
}
FuncStatus getStatus(FuncRequest const & /*ev*/)
{
// Nothing interesting to do here