On 2013-06-25 19:30:18 -0600 Germán Arias <[email protected]> wrote:
> The problem I'm facing with menus in window, is caused by events sent by
> NSApp (NSAppKitDefined events). But since only XGServerWindow can
> draw/move/resize a window, I think NSWindow should respond only to events
> sent by XGServerWindow. Events sent from other objects, don't have sense.
> And sets wrong frames. I think this would be more consistent.
>
> Germán.
>
Only the subtypes GSAppKitWindowMoved and GSAppKitWindowResized need
be discarded. Attached patch solves the problem. Objections to send this?
Germán.
<app.patch>
Index: Source/NSApplication.m
===================================================================
--- Source/NSApplication.m (revisión: 36757)
+++ Source/NSApplication.m (copia de trabajo)
@@ -2091,6 +2091,7 @@
default: /* pass all other events to the event's window */
{
+ short subtype = [theEvent subtype];
NSWindow *window = [theEvent window];
if (!theEvent)
@@ -2101,7 +2102,9 @@
else
NSDebugLLog(@"NSEvent", @"Send NSEvent type: %d to %@",
(int)type, window);
- if (window)
+ if (window &&
+ (subtype != GSAppKitWindowMoved) &&
+ (subtype != GSAppKitWindowResized))
[window sendEvent: theEvent];
else if (type == NSRightMouseDown)
[self rightMouseDown: theEvent];
_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev