• 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
Re: Click Through Bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Click Through Bug?
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: Calling class methods from other class methods
  • Next by Date: Re: How to catch control-click in table view?
  • Previous by thread: Re: Click Through Bug?
  • Next by thread: Re: Click Through Bug?
  • Index(es):
    • Date
    • Thread