X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be7c2a2033f57f92c23f0db8220cb53ad47eabde..226c11c0767b3dfded410b8c8be8cf0d9444d136:/src/palmos/frame.cpp diff --git a/src/palmos/frame.cpp b/src/palmos/frame.cpp index 2267eee58e..6015a059d3 100644 --- a/src/palmos/frame.cpp +++ b/src/palmos/frame.cpp @@ -183,6 +183,10 @@ void wxFrame::DoSetClientSize(int width, int height) // Get size *available for subwindows* i.e. excluding menu bar, toolbar etc. void wxFrame::DoGetClientSize(int *x, int *y) const { + wxSize size = GetSize(); + wxPoint pos = GetClientAreaOrigin(); + *x = size.x - pos.x - 1; + *y = size.y - pos.y - 1; } // ---------------------------------------------------------------------------- @@ -302,8 +306,17 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id) // get the origin of the client area in the client coordinates wxPoint wxFrame::GetClientAreaOrigin() const { - Coord x, y; - WinWindowToDisplayPt(&x,&y); - wxPoint pt(x,y); - return pt; + // there is no API to get client area but we know + // it starts after titlebar and 1 pixel of form border + Coord maxY = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y), + X = 1, + Y = 0; + while ( Y < maxY ) + { + if(!FrmPointInTitle(GetForm(),X,Y)) + return wxPoint(X,Y+1); + Y++; + } + + return wxPoint(X,0); }