[wxMac 2.6.3] wxWindowMac::DoClientToScreen returns a point with a
negative y
Laurent Carcone
laurent at w3.org
Wed Aug 23 06:31:35 PDT 2006
Hello,
We currently use the 2.6.3 release for the web browser/editor Amaya (http://www/w3.org/Amaya).
We use a notebook control to manage multiple documents with tabs and the event EVT_CONTEXT_MENU to raise a menu when a user right-click on a tab. That works fine on Linux and Windows but not on Mac OS X (10.3 and 10.4), the function HitTest returns -1 as index for the tab in this case.
We have the following instructions:
long flags = 0;
int page_id = 0;
wxPoint point = event.GetPosition();
page_id = HitTest(ScreenToClient(point), &flags);
Debugging the code, I found that the problem cames from ScreenToClient and more precisely from the function wxWindowMac::DoClientToScreen that calculates a point with a negative y. If I let the x unchanged and force the y (or ignore the last instruction if(y) *y -= origin.y; ), the function HitTest returns the right tab index.
What would be the right way to fix that problem ?
Thanks in advance,
--
Laurent Carcone
carcone at w3.org W3C/ERCIM
+33 (0)4 76 61 52 67 INRIA Rhône-Alpes, 655 Avenue de l'Europe
38334 Saint Ismier Cedex - France
More information about the wx-users
mailing list