• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Lion breaks the ability to "click-through" transparent window areas when the window is resizable.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lion breaks the ability to "click-through" transparent window areas when the window is resizable.


  • Subject: Lion breaks the ability to "click-through" transparent window areas when the window is resizable.
  • From: R R Hornback <email@hidden>
  • Date: Fri, 05 Aug 2011 16:01:13 -0400

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 (email@hidden)

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:

This email sent to email@hidden

  • Prev by Date: Re: Drawing text like Lion's Mail
  • Next by Date: Re: Symbol not found when compiling MM (ObjC++) file
  • Previous by thread: Re: Symbol not found when compiling MM (ObjC++) file
  • Next by thread: Re: Does anyone else dislike Xcode 4?
  • Index(es):
    • Date
    • Thread