|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
I'm porting code from PPC over to Intel. I have discovered the same interesting bug with several calls made to the toolbox call ::PtInIconSuite() in the Intel version that do not exist in the PPC version. The bug is that ::PtInIconSuite() returns false when mouse clicks are made directly on the icon. Variables viewed in the debugger reveal the mouse click is contained within the boundary of the icon rect. Further runtime testing revealed mouse clicks 1 or 2 pixels outside of the icon boundary sometimes, sometimes, are accepted as true in ::PtInIconSuite(). It is almost as if the inverse of what is expected is being returned by ::PtInIconSuite(). The toolbox call ::GetIconSuite() is used for reading. Since this same code works fine on the PPC version, this leads me to believe there is a byte swapping issue with the icon mask (which the documentation reveals ::PtInIconSuite() tests against). Since only the toolbox is used to read and process the icon, this byte swapping (or whatever) issue is contained with in the related toolbox calls (::GetIconSuite(), ::PtInIconSuite(), etc). Can anyone confirm this? Has anyone experienced similar behavior in their code? The "band aid" for this bug is to call ::MacPtInRect() passing the mouse point and the rect of the icon. Behavior is as expected, however, the icon does not highlight when clicked on. (The icon is highlighted when clicked on calling ::PtInIconSuite() in the PPC version.) Thanx! Joe _______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.