Apple Bug Friday! 49

2007-03-09 14:34:24 UTC

This bug is Slider does not invalidate a non-opaque window’s shadow when it is moved. It was filed on 2007-02-16 at 20:01 PST.


When a slider thumb is moved in a non-opaque window, the window’s shadow is not invalidated, leaving a hole in the window where the thumb was.

Steps to Reproduce:

  1. Create a window.
  2. Set its opaque to NO.
  3. Set its backgroundColor to a color with a alpha component < 1.
  4. Add a slider to its content view.
  5. Move the slider.

Expected Results:

No holes are knocked in the window.

Actual Results:

The slider leaves behind a hole in the background. The hole is not totally transparent; it simply does not have any of the window’s shadow in it.




The workaround is to send invalidateShadow to the window in the action method, and have the slider send its action method continuously. This workaround has two problems:

  1. It is not always preferred to send the action method continuously.
  2. In a pure Bindings app, there is no action method, continuous or otherwise, and adding the invalidateShadow message to the set-accessor method is Bad and Wrong.

The slider should repeatedly invalidate the shadow as its thumb is moved. For performance reasons, the ideal solution is to allow invalidation of the shadow only in a specific rect (in the case of the slider, that of its thumb, in both its former position and its latter position).

Test case:

Move the slider. To see that invalidating the shadow does indeed update the position of the hole to match that of the thumb, click “Invalidate shadow”.

The test case is SliderWindowAlphaTest 1.0.

Leave a Reply

Do not delete the second sentence.