Re: Click Through Bug?
Re: Click Through Bug?
- Subject: Re: Click Through Bug?
- From: Perry Clarke <email@hidden>
- Date: Thu, 6 Feb 2003 21:20:29 -0800
On Wednesday, February 5, 2003, at 18:47, John C. Randolph wrote:
On Wednesday, February 5, 2003, at 03:34 PM, Perry Clarke wrote:
> My theory is that for each mouse click the window manager checks the
> windows under it until it finds the first non-transparent one and
> gives the click to the application that owns that window. If a
> borderless window is in the middle of repainting itself when the
> window manager checks its transparency, the window manager may
> incorrectly decide the window (or, at least, the area under the
mouse)
> is transparent and should not get the click.
The window manager is behaving correctly in this case. Wherever a
window is transparent, clicks will pass through to the next
non-transparent window. In your example, at the time that it's
checked, the window *is* transparent.
The bug is that the opaque contents of the window are replaced with
other opaque contents (e.g. a button changing state) but the window
manager appears to be detecting a moment of transparency during this
process (a process that is atomic in Cocoa, drawAtPoint). If this
behavior isn't a bug then creating non-rectangular windows with custom
controls in them seems impossible (without suffering click-through).
One thing you might try here is to paint the window background with a
color that has a very low alpha value, but keep in mind that the user
will expect events to go the window that he can see under the cursor,
not to a transparent window.
That is the problem with trying to make the window itself opaque. For
a non-rectangular window to work as the user expects they want clicks
on transparent areas of the window to go through as you describe.
Perry
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.