Am 05.08.2011 um 22:01 schrieb R R Hornback: I just found this message while searching for a solution to the same problem.
> With OS X Lion, even when the window background is transparent, the window > still receives the mouse events. > > I have determined that this is related to whether or not the Window is > resizable. If the window is resizable, the mouse events are handled by the > Window. If it is NOT resizable, the events in the transparent areas are NOT > handled by the window. Are you sure? For me the window always receives the mouse event, even if I use NSBorderlessWindowMask and nothing else. This is on 10.7.1. Have you already filed a bug? Andreas P.S.: Since the original message is several weeks old, I'll quote it in full for reference: > The desire is to have a bordered, movable, resizable window with a "hollow" > interior--hollow meaning that the user can both see through the content area > (transparent) and any mouse/keyboard events are sent to whatever > window/application is below. > > This was easily accomplished prior to OS X 10.7 Lion by simply having an > NSWindow/NSPanel with a transparent background. > > With OS X Lion, even when the window background is transparent, the window > still receives the mouse events. > > I have determined that this is related to whether or not the Window is > resizable. If the window is resizable, the mouse events are handled by the > Window. If it is NOT resizable, the events in the transparent areas are NOT > handled by the window. > > NSRect windowRect = NSMakeRect( 200, 200, 200, 200 ); > > NSPanel hollowWindowResizable = [[NSPanel alloc] > initWithContentRect:windowRect styleMask:(NSHUDWindowMask | > NSNonactivatingPanelMask | NSTitledWindowMask | NSResizableWindowMask | > NSUtilityWindowMask | NSClosableWindowMask) backing:NSBackingStoreBuffered > defer:NO]; > > [hollowWindowResizable setBackgroundColor:[NSColor clearColor]]; > [hollowWindowResizable setReleasedWhenClosed:YES]; > [hollowWindowResizable setTitle:@"Resizable"]; > [hollowWindowResizable setFloatingPanel:YES]; > [hollowWindowResizable setCanHide:NO]; > [hollowWindowResizable setOpaque:YES]; > [hollowWindowResizable setHasShadow:NO]; > > //[hollowWindowResizable setIgnoresMouseEvents:TRUE]; > [hollowWindowResizable makeKeyAndOrderFront:nil]; > > > My guess is that this is a bug introduced with Lion's ability to resize a > window from any edge. > > Anyone have any ideas? > > Thanks, _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com