Abdelrazak Younes wrote:
Lars Gullik Bjønnes wrote:
Then we should have two differnt methods one that call update and one
that call repaint.
On scroll-down we should not allow combining paint events.
The weird thing is that on Windows the all screen repaint are
acknowledged and done in sequence.
Perhaps a genereal rule is: if the whole workarea is to be painted,
use repaint, if not, use update. That should be possible to put into
sourcecode.
Maybe... Let me think a bit about that. I could make a special case in
"WorkArea::redraw()".
Now, I thought about it I think our use of update is correct. The
problem you're facing is probably related to the fact that I called
"viewport->update()" instead of "update()". I have added commented out
the code in the former patch if it turns out that I am wrong so that you
can try it.
This patch goes in now as it is obviously correct.
Abdel.
Log:
call "update()" instead of "vieport()->update()"
Index: GuiWorkArea.C
===================================================================
--- GuiWorkArea.C (revision 14234)
+++ GuiWorkArea.C (working copy)
@@ -509,14 +509,18 @@
{
QPainter q(&paint_device_);
q.drawPixmap(x, y, pixmap);
- viewport()->update(x, y, pixmap.width(), pixmap.height());
+ update(x, y, pixmap.width(), pixmap.height());
}
void GuiWorkArea::expose(int x, int y, int w, int h)
{
-// lyxerr[Debug::GUI] << "expose " << w << 'x' << h
-// << '+' << x << '+' << y << std::endl;
+ /*
+ if (x == 0 && y == 0 && w == viewport()->width() && h ==
viewport()->height()) {
+ viewport()->repaint(x, y, w, h);
+ return;
+ }
+ */
update(x, y, w, h);
}
@@ -535,7 +539,7 @@
&& cursor_color_ == required_color
&& cursor_shape_ == shape) {
show_hcursor_ = lshape_cursor_;
- viewport()->update(cursor_x_, cursor_y_, cursor_w_, cursor_h_);
+ update(cursor_x_, cursor_y_, cursor_w_, cursor_h_);
return;
}
@@ -578,7 +582,7 @@
show_hcursor_ = true;
}
- viewport()->update(cursor_x_, cursor_y_, cursor_w_, cursor_h_);
+ update(cursor_x_, cursor_y_, cursor_w_, cursor_h_);
}
@@ -587,7 +591,7 @@
show_vcursor_ = false;
show_hcursor_ = false;
- viewport()->update(cursor_x_, cursor_y_, cursor_w_, cursor_h_);
+ update(cursor_x_, cursor_y_, cursor_w_, cursor_h_);
}