From: Vadim Zeitlin Date: Sat, 4 Mar 2006 22:09:40 +0000 (+0000) Subject: don't send mouse events to disabled windows (this really shouldn't be possible as... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f0756835d540c23e0103aede52b9857933f59837 don't send mouse events to disabled windows (this really shouldn't be possible as otherwise it allows the user to modify the state of a disabled control) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 7a58cf7506..c4cd59574e 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -497,6 +497,10 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev #endif } } + + // disabled windows must not get any input messages + if ( currentMouseWindow && !currentMouseWindow->MacIsReallyEnabled() ) + currentMouseWindow = NULL; } }