Keep track of the captured mouse window so the base GUI code thinks the window

is captured.  Doesn't capture it, but at least satisfies the assertions.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2003-07-29 02:20:51 +00:00
parent 6fa54bfe64
commit b9505233a5
2 changed files with 7 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ class WXDLLEXPORT wxWindowCocoa: public wxWindowBase, protected wxCocoaNSView
DECLARE_DYNAMIC_CLASS(wxWindowCocoa)
DECLARE_NO_COPY_CLASS(wxWindowCocoa)
DECLARE_EVENT_TABLE()
friend wxWindow *wxWindowBase::GetCapture();
// ------------------------------------------------------------------------
// initialization
// ------------------------------------------------------------------------
@@ -73,6 +74,7 @@ protected:
WX_NSView m_cocoaNSView;
WX_NSView m_dummyNSView;
bool m_isInPaint;
static wxWindow *sm_capturedWindow;
// ------------------------------------------------------------------------
// Implementation
// ------------------------------------------------------------------------

View File

@@ -27,6 +27,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
BEGIN_EVENT_TABLE(wxWindowCocoa, wxWindowBase)
END_EVENT_TABLE()
wxWindow *wxWindowCocoa::sm_capturedWindow = NULL;
// Constructor
void wxWindowCocoa::Init()
{
@@ -386,11 +388,13 @@ void wxWindow::SetFocus()
void wxWindow::DoCaptureMouse()
{
// TODO
sm_capturedWindow = this;
}
void wxWindow::DoReleaseMouse()
{
// TODO
sm_capturedWindow = NULL;
}
void wxWindow::DoScreenToClient(int *x, int *y) const
@@ -522,7 +526,7 @@ wxWindow *wxWindowBase::FindFocus()
/* static */ wxWindow *wxWindowBase::GetCapture()
{
// TODO
return NULL;
return wxWindowCocoa::sm_capturedWindow;
}
wxWindow *wxGetActiveWindow()