Mike Emmel wrote:

On 8/22/05, Chris @ Napatech <[EMAIL PROTECTED]> wrote:
Denis Oliver Kropp wrote:

Quoting Denis Oliver Kropp:


Quoting Chris @ Napatech:


I've been playing around with writing a small toolkit based on DirectFB.
I've run into a bit of a slowdown with my window motion handling. When I
attempt to drag a directfb window, the window trails after the cursor..
it just cannot keep up. I have a simple workaround implemented currently
that just disposes of every other motion event. This keeps the Move()
calls down, and keeps the window under the mouse. This seems to be a
sloppy workaround, and was curious if anyone could shed some light onto
a technique that would better cure this problem. Thanks.


That's exactly what LiTE is doing with motion events during window dragging.


If you mean "sloppy" in the sense of slow,
what do you mean by "disposes of every other motion event"?

LiTE discards any previous motion event if another one is in
the event buffer and only the latest motion event is dispatched
when the buffer has been fully processed or certain events require
intermediate flushing, e.g. button events.



I noticed the technique used in LiTE and tryed to recreate it in my
code.. I think I need to look at my code again. What i was doing was
actually just literally ignoring every other DWET_MOTION event while the
window is being moved by the user. VERY sloppy. My code is very
immature. It is mostly an personal attempt to dive into the DirectFB
code. I will end up posting the code within the next month or two, and
I'll certainly send a link out on this mailing list.


Standard practice in the toolkit is to coalesce window move or drag events if
the repaint has not finished as long as there are no intervening events.
Or to update the move if its outstanding. Generally your posting the
window move event back on the queue and all the moves are compressed
into the final move until it completes.  In any case the goal is to
move the window to its latest position each time it paints.

I hope that makes sense.

Mike
That makes perfect sense, now. I needed the clarification and I appreciate your help very much!
- Chris

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to