+ Window xwindow = (Window) GetMainWindow();
+
+ wxCHECK_RET( xwindow, wxT("invalid window") );
+
+#if !wxUSE_NANOX
+
+ XWindowAttributes attr;
+ Status status = XGetWindowAttributes( wxGlobalDisplay(), xwindow, &attr );
+ wxCHECK_RET( status, wxT("invalid window attributes") );
+
+ if (attr.width == width && attr.height == height)
+ {
+ XMoveWindow( wxGlobalDisplay(), xwindow, x, y );
+ return;
+ }
+
+ if (attr.x == x && attr.y == y)
+ {
+ XResizeWindow( wxGlobalDisplay(), xwindow, width, height );
+ return;
+ }
+
+ XMoveResizeWindow( wxGlobalDisplay(), xwindow, x, y, width, 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