bug-gnustep
[Top][All Lists]
Advanced

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

Re: [patch #7470] Fix mouse behaviour in Windows 95 and Macintosh menu s


From: Christopher Armstrong
Subject: Re: [patch #7470] Fix mouse behaviour in Windows 95 and Macintosh menu styles
Date: Mon, 21 Feb 2011 15:55:49 +1100

Hi Fred

On Sun, 20 Feb 2011 15:33 +0000, "Fred Kiefer" <INVALID.NOREPLY@gnu.org>
wrote:
> There is a lot that I don't understand about this long method, but one
> line
> seems to be obviously wrong. That is the stopping of periodic events. Why
> is
> this done here as well as outside of this method? But this hasn't changed
> with
> your patch, you may as well just leave it broken.

A closer look reveals that the periodic event stream is being used to
get the location of the mouse *outside* of GNUstep windows. It uses the
periodic events to query the location of the mouse outside of the event
stream, which gives the mouse location in screen coordinates and
independent of the window it is in. The old code couldn't rely on
NSMouseMoved events simply because they would not be sent if the mouse
is moving outside of the GNUstep windows.

By capturing the mouse, we now can get the mouse location in terms of
the capturing window and just follow normal NSMouseMoved events as we
get the mouse events for all windows while the mouse is captured. I
could experiment with doing this to see if we can get rid of the
annoying (and CPU-bound) start/stopPeriodEvents.

Cheers
Chris
-- 
  Christopher Armstrong
  carmstrong ^^AT^ fastmail dOT com /Dot/ au




reply via email to

[Prev in Thread] Current Thread [Next in Thread]