git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15766
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
public:
wxPopupWindow() { }
{
public:
wxPopupWindow() { }
-#ifdef __DARWIN__
- virtual ~wxPopupWindow() { }
-#endif
+ virtual ~wxPopupWindow();
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE)
{ (void)Create(parent, flags); }
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE)
{ (void)Create(parent, flags); }
{
public:
wxPopupWindow() { }
{
public:
wxPopupWindow() { }
-#ifdef __DARWIN__
- virtual ~wxPopupWindow() { }
-#endif
+ virtual ~wxPopupWindow();
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE)
{ (void)Create(parent, flags); }
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE)
{ (void)Create(parent, flags); }
// Created: 08/09/2000
// RCS-ID: $Id$
// Copyright: (c) 2000 Julian Smart, Vadim Zeitlin
// Created: 08/09/2000
// RCS-ID: $Id$
// Copyright: (c) 2000 Julian Smart, Vadim Zeitlin
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
{
wxPoint pt;
wxWindow* winAtPtr = wxFindWindowAtPointer(pt);
{
wxPoint pt;
wxWindow* winAtPtr = wxFindWindowAtPointer(pt);
msg.Printf("Picked %s (%d)", (const char*) winAtPtr->GetName(), winAtPtr->GetId());
cout << msg << '\n';
}
msg.Printf("Picked %s (%d)", (const char*) winAtPtr->GetName(), winAtPtr->GetId());
cout << msg << '\n';
}
if (winAtPtr)
DispatchEvent(winAtPtr, pt);
if (winAtPtr)
DispatchEvent(winAtPtr, pt);
bool wxContextHelp::EventLoop()
{
m_inHelp = TRUE;
bool wxContextHelp::EventLoop()
{
m_inHelp = TRUE;
while ( m_inHelp )
{
if (wxTheApp->Pending())
while ( m_inHelp )
{
if (wxTheApp->Pending())
wxTheApp->ProcessIdle();
}
}
wxTheApp->ProcessIdle();
}
}
{
wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), pt) ;
helpEvent.SetEventObject(this);
{
wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), pt) ;
helpEvent.SetEventObject(this);
eventProcessed = win->GetEventHandler()->ProcessEvent(helpEvent);
eventProcessed = win->GetEventHandler()->ProcessEvent(helpEvent);
// Go up the window hierarchy until the event is handled (or not).
// I.e. keep submitting ancestor windows until one is recognised
// by the app code that processes the ids and displays help.
// Go up the window hierarchy until the event is handled (or not).
// I.e. keep submitting ancestor windows until one is recognised
// by the app code that processes the ids and displays help.
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
+wxPopupWindow::~wxPopupWindow()
+{
+ if (GTK_WIDGET_HAS_GRAB(m_widget))
+ gtk_grab_remove( m_widget );
+}
+
bool wxPopupWindow::Create( wxWindow *parent, int style )
{
m_needParent = FALSE;
bool wxPopupWindow::Create( wxWindow *parent, int style )
{
m_needParent = FALSE;
GtkOnSize( m_x, m_y, m_width, m_height );
}
GtkOnSize( m_x, m_y, m_width, m_height );
}
+
+ if (!show)
+ gtk_grab_remove( m_widget );
+
bool ret = wxWindow::Show( show );
bool ret = wxWindow::Show( show );
+
+ if (show)
+ gtk_grab_add( m_widget );
+
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
+wxPopupWindow::~wxPopupWindow()
+{
+ if (GTK_WIDGET_HAS_GRAB(m_widget))
+ gtk_grab_remove( m_widget );
+}
+
bool wxPopupWindow::Create( wxWindow *parent, int style )
{
m_needParent = FALSE;
bool wxPopupWindow::Create( wxWindow *parent, int style )
{
m_needParent = FALSE;
GtkOnSize( m_x, m_y, m_width, m_height );
}
GtkOnSize( m_x, m_y, m_width, m_height );
}
+
+ if (!show)
+ gtk_grab_remove( m_widget );
+
bool ret = wxWindow::Show( show );
bool ret = wxWindow::Show( show );
+
+ if (show)
+ gtk_grab_add( m_widget );
+