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 protected])
>
> 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/jsbache%40adobe.com
>
> This email sent to [email protected]

_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to