Abdelrazak Younes a écrit :
Jean-Marc Lasgouttes a écrit :
"Andre" == Andre Poenitz
<[EMAIL PROTECTED]>
writes:
Andre> There is indeed no reason (in theory) for us to use repaint().
Andre> update() just does the right thing, possibly combining repeated
Andre> request to a single one.
Andre> In practivce, there might have been a reason at some point of
Andre> time where repaint() worked (better), although I doubt that
Andre> reason is still valid.
What happened to this patch? Did we decide something about it? Does it
help in some cases?
Michael Gerz tested it on windows where it made no harm. I am quite sure
it would make no harm on any platform and it might help "snappiness" for
low-end platform. I guess this is for 1.4.1. Attached the updated patch.
There is something I wonder about this repaint thing. In QContentPane.C,
there is a kind of buffer for pressed keys (keyeventQueue_); IIRC that
was introduced by Lars in order to improve snappiness whenever a user
hold down the PageDown key or the Down key. It was also created to avoid
"occasional drop of chars".
http://thread.gmane.org/gmane.editors.lyx.devel/43381
Reading this thread, I see that the problem was mainly on MacOSX. If
somebody is willing to test on this platform, I can provide a patch that
will remove this key buffering in the qt2 frontend.
In my qt4 port I have replaced all "repaint" calls with "update" and I
have commented out this buffer machinery. The end result is very snappy
and I don't see the effects described in the above thread.
Food for thought...
Abdel.
JMarc
------------------------------------------------------------------------
Index: qscreen.C
===================================================================
RCS file: /var/cvs/lyx/lyx-devel/src/frontends/qt2/qscreen.C,v
retrieving revision 1.29
diff -u -r1.29 qscreen.C
--- qscreen.C 19 May 2005 16:34:02 -0000 1.29
+++ qscreen.C 24 Jan 2006 16:14:34 -0000
@@ -144,7 +144,7 @@
break;
}
- owner_.getContent()->repaint(
+ owner_.getContent()->update(
cursor_x_, cursor_y_,
cursor_w_, cursor_h_);
}
@@ -160,5 +160,5 @@
&nocursor_pixmap_, 0, 0, cursor_w_, cursor_h_);
owner_.getContent()
- ->repaint(cursor_x_, cursor_y_, cursor_w_, cursor_h_);
+ ->update(cursor_x_, cursor_y_, cursor_w_, cursor_h_);
}