// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "window.h"
-#endif
-
#include "wx/setup.h"
#include "wx/menu.h"
#include "wx/dc.h"
wxCHECK_RET( xwindow, wxT("invalid window") );
- wxCHECK_RET( AcceptsFocus(), wxT("set focus on window that doesn't accept the focus") );
+ // Don't assert; we might be trying to set the focus for a panel
+ // with only static controls, so the panel returns false from AcceptsFocus.
+ // The app should be not be expected to deal with this.
+ if (!AcceptsFocus())
+ return;
#if 0
if (GetName() == "scrollBar")
}
XFreeGC( xdisplay, xgc );
+
+ // Move Clients, but not the scrollbars
+ // FIXME: There may be a better method to move a lot of Windows within X11
+ wxScrollBar *sbH = ((wxWindow *) this)->GetScrollbar( wxHORIZONTAL );
+ wxScrollBar *sbV = ((wxWindow *) this)->GetScrollbar( wxVERTICAL );
+ wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
+ while ( node )
+ {
+ // Only propagate to non-top-level windows
+ wxWindow *win = node->GetData();
+ if ( win->GetParent() && win != sbH && win != sbV )
+ {
+ wxPoint pos = win->GetPosition();
+ // Add the delta to the old Position
+ pos.x += dx;
+ pos.y += dy;
+ win->SetPosition(pos);
+ }
+ node = node->GetNext();
+ }
}
// ---------------------------------------------------------------------------