From c0ad3d42d5eb619556a3905df22338360b1f6fcc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 9 Nov 2001 17:58:50 +0000 Subject: [PATCH] removed focus assert git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 9 ++++++++- src/gtk1/window.cpp | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 2d74acd135..c17fcaa64d 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1828,7 +1828,14 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED if ( !g_activeFrameLostFocus && g_activeFrame ) { - wxASSERT_MSG( wxGetTopLevelParent(win) == g_activeFrame, wxT("unfocusing window that haven't gained focus properly") ) + // VZ: commenting this out because it does happen (although not easy + // to reproduce, I only see it when using wxMiniFrame and not + // always) and makes using Mahogany quite annoying +#if 0 + wxASSERT_MSG( wxGetTopLevelParent(win) == g_activeFrame, + wxT("unfocusing window that hasn't gained focus properly") ) +#endif // 0 + g_activeFrameLostFocus = TRUE; } diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 2d74acd135..c17fcaa64d 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -1828,7 +1828,14 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED if ( !g_activeFrameLostFocus && g_activeFrame ) { - wxASSERT_MSG( wxGetTopLevelParent(win) == g_activeFrame, wxT("unfocusing window that haven't gained focus properly") ) + // VZ: commenting this out because it does happen (although not easy + // to reproduce, I only see it when using wxMiniFrame and not + // always) and makes using Mahogany quite annoying +#if 0 + wxASSERT_MSG( wxGetTopLevelParent(win) == g_activeFrame, + wxT("unfocusing window that hasn't gained focus properly") ) +#endif // 0 + g_activeFrameLostFocus = TRUE; } -- 2.45.2