+void wxWindowX11::DoMoveWindow(int x, int y, int width, int height)
+{
+ Window xwindow = (Window) m_mainWindow;
+
+ wxCHECK_RET( xwindow, wxT("invalid window") );
+
+#if !wxUSE_NANOX
+
+ XMoveResizeWindow( wxGlobalDisplay(), xwindow, x, y, width, height );
+ if (m_mainWindow != m_clientWindow)
+ {
+ xwindow = (Window) m_clientWindow;
+
+ wxWindow *window = (wxWindow*) this;
+ wxRenderer *renderer = window->GetRenderer();
+ if (renderer)
+ {
+ wxRect border = renderer->GetBorderDimensions( (wxBorder)(m_windowStyle & wxBORDER_MASK) );
+ x = border.x;
+ y = border.y;
+ width -= border.x + border.width;
+ height -= border.y + border.height;
+ }
+ else
+ {
+ x = 0;
+ y = 0;
+ }
+
+ wxScrollBar *sb = window->GetScrollbar( wxHORIZONTAL );
+ if (sb && sb->IsShown())
+ {
+ wxSize size = sb->GetSize();
+ height -= size.y;
+ }
+ sb = window->GetScrollbar( wxVERTICAL );
+ if (sb && sb->IsShown())
+ {
+ wxSize size = sb->GetSize();
+ width -= size.x;
+ }
+
+ XMoveResizeWindow( wxGlobalDisplay(), xwindow, x, y, wxMax(1, width), wxMax(1, height) );
+ }
+
+#else
+
+ XWindowChanges windowChanges;
+ windowChanges.x = x;
+ windowChanges.y = y;
+ windowChanges.width = width;
+ windowChanges.height = height;
+ windowChanges.stack_mode = 0;
+ int valueMask = CWX | CWY | CWWidth | CWHeight;
+
+ XConfigureWindow( wxGlobalDisplay(), xwindow, valueMask, &windowChanges );
+
+#endif
+}
+