# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1318234143 0 # Node ID f5b79d8b0694a9b913c2b4d64d87b237253549cf # Parent cfe8608253a8ac31ba2abd2a132bf8e88608b154 Fixed positioning popup menu when the controlling window is not visible on Mac. diff -r cfe8608253a8 -r f5b79d8b0694 mac/dw.m --- a/mac/dw.m Mon Oct 10 05:27:14 2011 +0000 +++ b/mac/dw.m Mon Oct 10 08:09:03 2011 +0000 @@ -6825,6 +6825,8 @@ NSView *view = [object isKindOfClass:[NSWindow class]] ? [object contentView] : parent; NSWindow *window = [view window]; NSEvent *event = [DWApp currentEvent]; + if(!window) + window = [event window]; NSPoint p = NSMakePoint(x, [[NSScreen mainScreen] frame].size.height - y); NSEvent* fake = [NSEvent mouseEventWithType:NSRightMouseDown location:[window convertScreenToBase:p]