From 496beb3fc0244c36bdb0e37055aa868012b52a23 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 28 Sep 2001 19:20:21 +0000 Subject: [PATCH] fixed client area origin handling in wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 16 ++-------------- src/gtk1/window.cpp | 16 ++-------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index d196049172..7af1eff2e3 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3003,20 +3003,8 @@ void wxWindowGTK::DoGetPosition( int *x, int *y ) const dy = pizza->yoffset; } - int nx = m_x - dx; - int ny = m_y - dy; - - if ( !IsTopLevel() && m_parent ) - { - // 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 pt(m_parent->GetClientAreaOrigin()); - nx -= pt.x; - ny -= pt.y; - } - - if (x) (*x) = nx; - if (y) (*y) = ny; + if (x) (*x) = m_x - dx; + if (y) (*y) = m_y - dy; } void wxWindowGTK::DoClientToScreen( int *x, int *y ) const diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index d196049172..7af1eff2e3 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -3003,20 +3003,8 @@ void wxWindowGTK::DoGetPosition( int *x, int *y ) const dy = pizza->yoffset; } - int nx = m_x - dx; - int ny = m_y - dy; - - if ( !IsTopLevel() && m_parent ) - { - // 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 pt(m_parent->GetClientAreaOrigin()); - nx -= pt.x; - ny -= pt.y; - } - - if (x) (*x) = nx; - if (y) (*y) = ny; + if (x) (*x) = m_x - dx; + if (y) (*y) = m_y - dy; } void wxWindowGTK::DoClientToScreen( int *x, int *y ) const -- 2.45.2