X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/271f05f7addd11d373afd51062e1dd54fad375e1..f94a81c084696210418b8709e8ab649a18465fa6:/src/x11/window.cpp diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 82239d1163..000e1721e1 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -17,10 +17,6 @@ // 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" @@ -370,7 +366,11 @@ void wxWindowX11::SetFocus() 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")