Re: Minimum alpha value for transparent windows
Re: Minimum alpha value for transparent windows
- Subject: Re: Minimum alpha value for transparent windows
- From: Jesper Storm Bache <email@hidden>
- Date: Fri, 4 Sep 2009 16:13:41 -0700
- Acceptlanguage: en-US
- Thread-topic: Minimum alpha value for transparent windows
If you are interested in mouse events in your entire window area, then
you can use
[NSWindow setIgnoresMouseEvents:NO] and not have to worry about "faint
paint" issues.
Jesper Storm Bache
Core Technologies
Adobe Systems Inc
On Sep 4, 2009, at 4:02 PM, Gabriel Zachmann wrote:
> I've got a window that is not opaque ( [self setOpaque: NO] ).
> It contains basically just one view.
>
> I fill the view with a semi-transparent gray, like this:
>
> semiTransparentGray_ = [NSColor colorWithDeviceRed:0.1 green:0.1 blue:
> 0.1 alpha: 0.05];
> [semiTransparentGray_ set];
> NSRectFill( [self frame] );
>
> This makes the window receive all mouse events, which is exactly what
> I want.
>
> The funny thing is: as soon as I set the alpha value to some value
> less than 0.05, the window does not receive the mouse events any more!
> I.e., it is click-through.
>
> Can someone confirm that 0.05 is actually the minimum alpha value so
> that the window manager considers the window to be interested in the
> mouse events?
> Or am I missing something?
>
> Thanks a lot in advance.
>
> Best regards,
> Gabriel.
>
> PS:
> For other reasons, the window must be non-opqaue.
>
>
>
>
>
> <smime.p7s>_______________________________________________
>
> 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
_______________________________________________
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