// ----------------------------------------------------------------------------
extern wxHashTable *wxWidgetHashTable;
+static wxWindow* g_captureWindow = NULL;
+
// ----------------------------------------------------------------------------
// private functions
// Destructor
wxWindow::~wxWindow()
{
+ if (g_captureWindow == this)
+ g_captureWindow = NULL;
+
m_isBeingDeleted = TRUE;
// Motif-specific actions first
void wxWindow::CaptureMouse()
{
+ g_captureWindow = this;
if ( m_winCaptured )
return;
void wxWindow::ReleaseMouse()
{
+ g_captureWindow = NULL;
if ( !m_winCaptured )
return;
wxAcceleratorEntry* entry = & (entries[i]);
if (entry->MatchesEvent(event))
{
- // Bingo, we have a match. Now find a control that matches the entry
- // command id.
+ // Bingo, we have a match. Now find a control that matches the
+ // entry command id.
// Need to go up to the top of the window hierarchy, since it might
// be e.g. a menu item
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)
return wxPoint(rootX, rootY);
}
+
// ----------------------------------------------------------------------------
// wxNoOptimize: switch off size optimization
// ----------------------------------------------------------------------------
int wxNoOptimize::ms_count = 0;
-
-
-