[wxMac 2.6.3] wxWindowMac::DoClientToScreen returns a point
with a negative y
Laurent Carcone
laurent at w3.org
Tue Aug 29 06:21:07 PDT 2006
Hello Stefan,
Thanks for the tip.
Regards,
Laurent Carcone
On Tue, 29 Aug 2006 13:13:38 +0200
"Stefan Csomor" <csomor at advancedconcepts.ch> wrote:
> Hi
>
> the client coordinates are the coordinates relative to the client area, which in a mac notebook starts below the tabs, ie where the content is. You could add the GetClientAreaOrigin to get a window relative coordinate
>
> HTH
>
> Stefan
>
> > -----Original Message-----
> > From: Laurent Carcone [mailto:laurent at w3.org]
> > Sent: Mittwoch, 23. August 2006 15:32
> > To: wx-users at lists.wxwidgets.org
> > Subject: [wxMac 2.6.3] wxWindowMac::DoClientToScreen returns
> > a point with a negative y
> >
> > 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
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> > For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>
>
>
--
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