Re: GDK_POINTER_MOTION_HINT_MASK has no effect



On Nov 28, 2007 2:44 AM, Stewart Weiss <stewart weiss acm org> wrote:
> I am running this on a Windows box with gtk+ 2.12 installed.

Ah, OK. I don't think the windows backend uses the is_hint field, so
you can just ignore it.

It's because X11 is asynchronous. The window server keeps on trucking
(and sending a lot of highly detailed mouse tracking information) even
if your program pauses for a moment. As a result, you can get a
backlog of mouse events and this causes very annoying lag in your
application.

The idea of is_hint is that when your program comes back to check for
mouse events it just sees an is_hint event, meaning "a lot of mouse
action has taken place, read the pointer explicitly to get the
latest". So you get asynchronous mouse evnts and no lag.

Windows is synchronous (the server can never run ahead of the
application) so it doesn;t need this mechanism. Just ignnore is_hint
and it'll work fine.

John


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]