Various wxMotif fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2001-07-09 13:14:28 +00:00
parent 43bb528818
commit 9806a47c30
10 changed files with 65 additions and 17 deletions

View File

@@ -80,6 +80,8 @@ static const int SCROLL_MARGIN = 4;
// ----------------------------------------------------------------------------
extern wxHashTable *wxWidgetHashTable;
static wxWindow* g_captureWindow = NULL;
// ----------------------------------------------------------------------------
// private functions
@@ -383,6 +385,9 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
// Destructor
wxWindow::~wxWindow()
{
if (g_captureWindow == this)
g_captureWindow = NULL;
m_isBeingDeleted = TRUE;
// Motif-specific actions first
@@ -710,6 +715,7 @@ wxString wxWindow::GetTitle() const
void wxWindow::CaptureMouse()
{
g_captureWindow = this;
if ( m_winCaptured )
return;
@@ -722,6 +728,7 @@ void wxWindow::CaptureMouse()
void wxWindow::ReleaseMouse()
{
g_captureWindow = NULL;
if ( !m_winCaptured )
return;
@@ -2977,6 +2984,13 @@ wxWindow *wxGetActiveWindow()
return NULL;
}
/* static */
wxWindow *wxWindowBase::GetCapture()
{
return (wxWindow *)g_captureWindow;
}
// Find the wxWindow at the current mouse position, returning the mouse
// position.
wxWindow* wxFindWindowAtPointer(wxPoint& pt)
@@ -3001,12 +3015,10 @@ wxPoint wxGetMousePosition()
return wxPoint(rootX, rootY);
}
// ----------------------------------------------------------------------------
// wxNoOptimize: switch off size optimization
// ----------------------------------------------------------------------------
int wxNoOptimize::ms_count = 0;