• 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
Minimum alpha value for transparent windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Minimum alpha value for transparent windows


  • Subject: Minimum alpha value for transparent windows
  • From: Gabriel Zachmann <email@hidden>
  • Date: Sat, 5 Sep 2009 01:02:14 +0200

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.





Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: Minimum alpha value for transparent windows
      • From: Jesper Storm Bache <email@hidden>
  • Prev by Date: Re: Application main menu title behavior change in 10.6
  • Next by Date: Re: Minimum alpha value for transparent windows
  • Previous by thread: Re: (no subject)
  • Next by thread: Re: Minimum alpha value for transparent windows
  • Index(es):
    • Date
    • Thread