gnustep-dev
[Top][All Lists]
Advanced

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

GSAppKitDefined events: queue, or send directly to window?


From: Eric Wasylishen
Subject: GSAppKitDefined events: queue, or send directly to window?
Date: Tue, 15 Feb 2011 12:53:02 -0700

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]