YOUNES Abdelrazak (M3SYSTEM) a écrit :
Hello Bennett,

I'll send a patch tomorrow but you can already test if the patch I sent earlier 
has any impact on performance on MacOSX.

Hi Bennet,
Please find attached the patch that remove the key buffering. This is completely untested because I cannot link qt2 frontend anymore. But it should work. If would be good to test the two patches independently and then both at the same time. The test cases are:
- Keep a character key pressed (ex: 'a')
- Keep the down arrow key pressed
- Keep the PageDown key pressed
- Type as fast as you can and see if there are any character dropped.

Thanks,
Abdel.



Abdel.


-----Original Message-----
From: Bennett Helm [mailto:[EMAIL PROTECTED]
Sent: Tue 1/24/2006 7:39 PM
To: YOUNES Abdelrazak (M3SYSTEM)
Cc: lyx-devel@lists.lyx.org
Subject: Re: [Patch] (Re: Screen update improvements)
On Jan 24, 2006, at 12:14 PM, Abdelrazak Younes wrote:

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.

That would be me: I'm happy to test.

Bennett


____

This message and any files transmitted with it are legally privileged and 
intended for the sole use of the individual(s) or entity to whom they are 
addressed. If you are not the intended recipient, please notify the sender by 
reply and delete the message and any attachments from your system. Any 
unauthorised use or disclosure of the content of this message is strictly 
prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on 
the part of EUROCONTROL unless it is confirmed by appropriately signed hard 
copy.

Any views expressed in this message are those of the sender.



Index: QContentPane.C
===================================================================
RCS file: /var/cvs/lyx/lyx-devel/src/frontends/qt2/QContentPane.C,v
retrieving revision 1.37
diff -u -r1.37 QContentPane.C
--- QContentPane.C      26 Nov 2005 20:28:38 -0000      1.37
+++ QContentPane.C      25 Jan 2006 14:55:04 -0000
@@ -91,7 +91,7 @@
                boost::bind(&QContentPane::generateSyntheticMouseEvent,
                            this));

-       connect(&step_timer_, SIGNAL(timeout()), SLOT(keyeventTimeout()));
+//     connect(&step_timer_, SIGNAL(timeout()), SLOT(keyeventTimeout()));

        setFocusPolicy(QWidget::WheelFocus);
        setFocus();
@@ -106,7 +106,7 @@
                this, SLOT(scrollBarChanged(int)));

        // Start the timer, one-shot.
-       step_timer_.start(50, true);
+//     step_timer_.start(50, true);
 }


@@ -264,7 +264,10 @@

 void QContentPane::keyPressEvent(QKeyEvent * e)
 {
-       keyeventQueue_.push(boost::shared_ptr<QKeyEvent>(new QKeyEvent(*e)));
+//     keyeventQueue_.push(boost::shared_ptr<QKeyEvent>(new QKeyEvent(*e)));
+    boost::shared_ptr<QLyXKeySym> sym(new QLyXKeySym);
+    sym->set(e);
+    wa_->workAreaKeyPress(sym, q_key_state(e->state()));
 }
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_);
 }

Reply via email to