- // We may be faking the client origin.
- // So a window that's really at (0, 30) may appear
- // (to wxWin apps) to be at (0, 0).
- wxPoint pt1(GetClientAreaOrigin());
- *x += pt1.x;
- *y += pt1.y;
+ // our client area origin (0, 0) may be really something like (0, 30) for
+ // wxWindow if we have a toolbar, account for it before translating
+ wxPoint pt(GetClientAreaOrigin());
+ if ( x )
+ *x += pt.x;
+ if ( y )
+ *y += pt.y;