gnustep-dev
[Top][All Lists]
Advanced

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

Re: GSAppKitDefined events: queue, or send directly to window?


From: Fred Kiefer
Subject: Re: GSAppKitDefined events: queue, or send directly to window?
Date: Tue, 15 Feb 2011 21:11:59 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11

Hi Eric,

in general the Windows backend is full of hacks, most of which are just
workarounds for other hacks and most of the others not needed.

I think that we should try to keep the events in the order in which they
arrive. Otherwise we could get rather bizarre results. In this specific
case on the other end it really may help to send the event directly. I
could agree on committing your patch now and having everybody test it
for a while. When we get a problem with it, we just revert before the
next release.
Overall I would prefer an implementation where NSAppKitDefined events
where handled by gui even when in an event tracking loop.

Fred

Am 15.02.2011 20:53, schrieb Eric Wasylishen:
> Hey,
> I noticed that when the win32 backend is notified of a window's position 
> being changed or resized by the WM, it sends a NSAppKitDefined event directly 
> to the relevant NSWindow using sendEvent: rather than queuing it. The x11 
> backend, on the other hand, queues these like regular input events. I wonder 
> which one of these is the correct approach?
> 
> 
> There is an annoying bug where if you position a vertical main menu near the 
> top of the screen in GNOME, and open one of the first submenus which overlaps 
> the GNOME top of screen toolbar, the menu highlight gets offset from the 
> mouse location by 10 or so pixels.
> 
> What happens is the GNOME WM moves the submenu down so it's not overlapping 
> the toolbar. However, since GNUstep is running in an event tracking loop, it 
> doesn't process the NSAppKitDefined which would update the NSWIndow's frame - 
> then, it uses the out of date window frame to calculate which menu item is 
> under the mouse which ends up being incorrect.
> 
> I was able to fix this just by modifying the x11 backend to act like the 
> win23 one, sending NSAppKitDefined events for window size and location 
> directly to the window instead of queuing them. I didn't notice any problems 
> as a result, but does this sound like something I should commit?
> 
> Cheers,
> Eric




reply via email to

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