Dislaying popup tip windows seems to work right now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,9 +27,7 @@ class wxPopupWindow: public wxPopupWindowBase
|
||||
{
|
||||
public:
|
||||
wxPopupWindow() { }
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxPopupWindow() { }
|
||||
#endif
|
||||
virtual ~wxPopupWindow();
|
||||
|
||||
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE)
|
||||
{ (void)Create(parent, flags); }
|
||||
|
@@ -27,9 +27,7 @@ class wxPopupWindow: public wxPopupWindowBase
|
||||
{
|
||||
public:
|
||||
wxPopupWindow() { }
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxPopupWindow() { }
|
||||
#endif
|
||||
virtual ~wxPopupWindow();
|
||||
|
||||
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE)
|
||||
{ (void)Create(parent, flags); }
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 08/09/2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Julian Smart, Vadim Zeitlin
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
@@ -144,14 +144,14 @@ bool wxContextHelp::BeginContextHelp(wxWindow* win)
|
||||
{
|
||||
wxPoint pt;
|
||||
wxWindow* winAtPtr = wxFindWindowAtPointer(pt);
|
||||
/*
|
||||
/*
|
||||
if (winAtPtr)
|
||||
{
|
||||
wxString msg;
|
||||
wxString msg;
|
||||
msg.Printf("Picked %s (%d)", (const char*) winAtPtr->GetName(), winAtPtr->GetId());
|
||||
cout << msg << '\n';
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
if (winAtPtr)
|
||||
DispatchEvent(winAtPtr, pt);
|
||||
@@ -170,6 +170,7 @@ bool wxContextHelp::EndContextHelp()
|
||||
bool wxContextHelp::EventLoop()
|
||||
{
|
||||
m_inHelp = TRUE;
|
||||
|
||||
while ( m_inHelp )
|
||||
{
|
||||
if (wxTheApp->Pending())
|
||||
@@ -181,6 +182,7 @@ bool wxContextHelp::EventLoop()
|
||||
wxTheApp->ProcessIdle();
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -223,8 +225,9 @@ bool wxContextHelp::DispatchEvent(wxWindow* win, const wxPoint& pt)
|
||||
{
|
||||
wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), pt) ;
|
||||
helpEvent.SetEventObject(this);
|
||||
|
||||
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.
|
||||
|
@@ -149,6 +149,12 @@ END_EVENT_TABLE()
|
||||
|
||||
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;
|
||||
@@ -342,9 +348,15 @@ bool wxPopupWindow::Show( bool show )
|
||||
|
||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
||||
}
|
||||
|
||||
|
||||
if (!show)
|
||||
gtk_grab_remove( m_widget );
|
||||
|
||||
bool ret = wxWindow::Show( show );
|
||||
|
||||
|
||||
if (show)
|
||||
gtk_grab_add( m_widget );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@@ -149,6 +149,12 @@ END_EVENT_TABLE()
|
||||
|
||||
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;
|
||||
@@ -342,9 +348,15 @@ bool wxPopupWindow::Show( bool show )
|
||||
|
||||
GtkOnSize( m_x, m_y, m_width, m_height );
|
||||
}
|
||||
|
||||
|
||||
if (!show)
|
||||
gtk_grab_remove( m_widget );
|
||||
|
||||
bool ret = wxWindow::Show( show );
|
||||
|
||||
|
||||
if (show)
|
||||
gtk_grab_add( m_widget );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user