| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Mar 27, 2007, at 9:57 AM, Chinh Nguyen wrote: I've got a floating compositing window I load from a NIB populated with a bunch of bevel buttons, a static text field, and a separator. For contextual menu support, I installed a kEventControlContextualMenuClick handler to the content view. When I right click on the window, if my click lands on the static text control, separator, or window, my contextual menu appears in the correct place. But if I right click on a bevel button, my contextual menu appears in the wrong place. After some debugging, it appears that even though I installed my contextual menu handler on the content view, the kEventParamDirectObject I get back is whatever control I right clicked on. And right clicking on a bevel button returns a point relative to the bevel button, not the content view (even though the other controls are handled properly). Is this normal? You should probably always get the direct object from the event, get the mouse location, and use HIPointConvert or HIViewConvertPoint to convert the mouse location from the direct object view to your view (or to global coordinates). -eric |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden This email sent to email@hidden
| References: | |
| >Contextual menu and compositing window (From: Chinh Nguyen <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.