X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3379ed3789e405f874d9db757d95346f1d378795..2cc78389312dce6285d0d6b6e891d24372252ada:/src/gtk1/window.cpp diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 292de55f0d..8dfbf2b096 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2260,11 +2260,13 @@ wxWindow *wxGetActiveWindow() // wxWindowGTK //----------------------------------------------------------------------------- +// in wxUniv/MSW this class is abstract because it doesn't have DoPopupMenu() +// method #ifdef __WXUNIVERSAL__ - IMPLEMENT_DYNAMIC_CLASS(wxWindowGTK, wxWindowBase) -#else + IMPLEMENT_ABSTRACT_CLASS(wxWindowGTK, wxWindowBase) +#else // __WXGTK__ IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase) -#endif +#endif // __WXUNIVERSAL__/__WXGTK__ void wxWindowGTK::Init() { @@ -3605,7 +3607,7 @@ void wxWindowGTK::ApplyWidgetStyle() // Pop-up menu stuff //----------------------------------------------------------------------------- -#if wxUSE_MENUS +#if wxUSE_MENUS_NATIVE static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting ) { @@ -3677,7 +3679,7 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y ) return TRUE; } -#endif // wxUSE_MENUS +#endif // wxUSE_MENUS_NATIVE #if wxUSE_DRAG_AND_DROP @@ -3741,15 +3743,13 @@ void wxWindowGTK::CaptureMouse() { wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); - wxCHECK_RET( g_captureWindow == NULL, wxT("CaptureMouse called twice") ); - GdkWindow *window = (GdkWindow*) NULL; if (m_wxwindow) window = GTK_PIZZA(m_wxwindow)->bin_window; else window = GetConnectWidget()->window; - if (!window) return; + wxCHECK_RET( window, _T("CaptureMouse() failed") ); wxCursor* cursor = & m_cursor; if (!cursor->Ok()) @@ -3772,7 +3772,7 @@ void wxWindowGTK::ReleaseMouse() { wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); - wxCHECK_RET( g_captureWindow, wxT("ReleaseMouse called twice") ); + wxCHECK_RET( g_captureWindow, wxT("can't release mouse - not captured") ); GdkWindow *window = (GdkWindow*) NULL; if (m_wxwindow)