#8700: SoundPlay missing buttons ----------------------------------+---------------------------- Reporter: Disreali | Owner: jscipione Type: bug | Status: assigned Priority: normal | Milestone: R1 Component: Kits/Interface Kit | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All ----------------------------------+---------------------------- Comment (by jscipione): Soundplay expects the clipping constraints of the view to be ignored when drawing it's buttons. hrev44039 takes the view's clipping constraints into account in the following code: {{{ // get the clipping constraints for the view BRegion clipping; view->GetClippingRegion(&clipping); // intersect constraints with updateRect BRegion updateClipping(updateRect); clipping.IntersectWith(&updateClipping); // clip to the intersection view->ConstrainClippingRegion(&clipping); }}} Ignoring the clipping constraints of the view like in the following code fixes this bug but also breaks new code that assumes the the clipping constraints of the view will be honored. {{{ // clip to updateRect view->ConstrainClippingRegion(&updateRect); }}} Respecting the clipping constraints of the view seems like the more correct thing to do, but, since SoundPlay depends on the clipping constraints of the view being ignored when drawing it's buttons we need to also ignore them and then fix the code that depends on the clipping constrains of the view being set, most notably the code that draws the Return key in Keymap Preferences. It is also a good idea to preserve the existing clipping constrains of the view by surrounding the button drawing code with PushState() and PopState() calls like this: {{{ view->PushState() ... view->PopState() }}} If nobody wants to tackle this I'll work on a fix shortly. -- Ticket URL: <http://dev.haiku-os.org/ticket/8700#comment:12> Haiku <http://dev.haiku-os.org> Haiku - the operating system.