From 72f8c792205f18e8f171468240b6c04ceca000d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 31 Jul 2006 12:17:39 +0000 Subject: [PATCH] don't pass window argument to NotifyCaptureLost, it's not needed/used git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/window.h | 5 ++--- src/common/wincmn.cpp | 2 +- src/msw/window.cpp | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/wx/window.h b/include/wx/window.h index 338073b554..6efb7a0249 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -1329,9 +1329,8 @@ protected: virtual void DoSetWindowVariant( wxWindowVariant variant ) ; // Must be called when mouse capture is lost to send - // wxMouseCaptureLostEvent to windows on capture stack. The argument is - // the window gaining capture or NULL if outside of wx code or none. - static void NotifyCaptureLost(wxWindow *gainedCapture); + // wxMouseCaptureLostEvent to windows on capture stack. + static void NotifyCaptureLost(); private: // contains the last id generated by NewControlId diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 101c995e7f..62995e54a8 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -2406,7 +2406,7 @@ static void DoNotifyWindowAboutCaptureLost(wxWindow *win) } /* static */ -void wxWindowBase::NotifyCaptureLost(wxWindow *gainedCapture) +void wxWindowBase::NotifyCaptureLost() { // don't do anything if capture lost was expected, i.e. resulted from // a wx call to ReleaseMouse or CaptureMouse: diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 2d079a5918..22b2626855 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -4107,12 +4107,11 @@ bool wxWindowMSW::HandlePaletteChanged(WXHWND hWndPalChange) bool wxWindowMSW::HandleCaptureChanged(WXHWND hWndGainedCapture) { - wxWindow *win = wxFindWinFromHandle(hWndGainedCapture); - // notify windows on the capture stack about lost capture // (see http://sourceforge.net/tracker/index.php?func=detail&aid=1153662&group_id=9863&atid=109863): - wxWindowBase::NotifyCaptureLost(win); + wxWindowBase::NotifyCaptureLost(); + wxWindow *win = wxFindWinFromHandle(hWndGainedCapture); wxMouseCaptureChangedEvent event(GetId(), win); event.SetEventObject(this); return GetEventHandler()->ProcessEvent(event);