Martin Vermeer a écrit :
On Fri, 2006-03-17 at 14:12 +0100, Abdelrazak Younes wrote:
Martin Vermeer a écrit :
On Fri, 2006-03-17 at 12:25 +0100, Georg Baum wrote:
I don't... but it appears straightforward to do. See patch. Works fine
for me.
Hello Martin,
It seems to work fine on screen but...

+       //expose(0, 0, workarea().workWidth(), workarea().workHeight());
+       expose(0, vi.y1, workarea().workWidth(), vi.y2 - vi.y1);
I get negative y-position when I page down with your patch:
expose 671x563+0+-80
expose 671x563+0+-80
expose 671x563+0+-80
expose 671x527+0+-68
expose 671x527+0+-67

When I scroll to some other place I have:
671x740+0+-210
Which should be
671x740+0+0
shouldn't it?

Ouch, this looks creepy. Like painting on air...

Try the attached new patch. It seems we were still painting too much,
and even with this new patch, no visible loss of... anything.

Actually with your first patch, if you open a document, type Ctrl+end, then only half of of screen is redrawn :-) And if you open a new document (ctrl+n), the bottom part of the area is not drawn.

Abdel.



Weird.

- Martin



------------------------------------------------------------------------

Index: screen.C
===================================================================
--- screen.C    (revision 13408)
+++ screen.C    (working copy)
@@ -219,7 +219,8 @@ void LyXScreen::redraw(BufferView & bv, workarea().getPainter().start();
        paintText(bv, vi);
        lyxerr[Debug::DEBUG] << "Redraw screen" << endl;
-       expose(0, 0, workarea().workWidth(), workarea().workHeight());
+ expose(0, std::max(vi.y1, 0), workarea().workWidth(), + vi.y2 - std::max(vi.y1, 0));
        workarea().getPainter().end();
        theCoords.doneUpdating();
 }

Reply via email to