Re: Make NSWindow immovable by dragging bottom bar
Re: Make NSWindow immovable by dragging bottom bar
- Subject: Re: Make NSWindow immovable by dragging bottom bar
- From: PCWiz <email@hidden>
- Date: Sat, 2 Jan 2010 15:31:29 -0700
I didn't try an NSView but I tried something similar. I tried creating a new NSWindow with the NSBorderlessWindowMask, setting its background color to -[NSColor clearColor] and then positioning it over the bottom bar. This worked...kinda, except for the fact that instead of the "clear" color, the affected area was now black. Then I tried using [window setOpaque:NO]; and that got rid of the black color, except for now, even though the child window did exist, the mouse events would pass through to the window underneath, rendering this useless.
In any case, I still want the resize corner to work, and using a window or a view to cover it would block out the resize corner as well.
I'm starting to think that I might need to just draw a custom window from scratch. Are there any open source examples of this? An NSWindow attached to an NSStatusItem? I know only of Matt Gemmell's MAAttachedWindow, but that one has an HUD appearance (not the default OS X NSWindow look I want).
Independent Cocoa Developer, Macatomy Software
http://macatomy.com
On 2010-01-02, at 3:19 PM, Nick Zitzmann wrote:
>
> On Jan 2, 2010, at 3:12 PM, PCWiz wrote:
>
>> The window is going to be "attached" to an NSStatusItem, so it would be best if it stayed in one spot.
>
> OK, that's a good enough reason. :) Did you try adding a custom view to the affected area that (1) is transparent, and (2) "acts" on mouse events by doing nothing rather than the default behavior of passing them to the next responder?
>
> Nick Zitzmann
> <http://www.chronosnet.com/>
>
>
>
_______________________________________________
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