]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/event.cpp
replaced C++ comments with C ones
[wxWidgets.git] / src / common / event.cpp
index e9a76b3fd2355631b84d26ded1a09a3708ca9f2d..02c63cc4fa448445bb324774dc40c5a98be95418 100644 (file)
@@ -1001,12 +1001,14 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event)
     {
         wxWindow *win = (wxWindow *)this;
 
-        // also, don't propagate events beyond the first top level window: it
-        // doesn't make sense to process dialogs events in the parent frame
-        if ( !win->IsTopLevel() )
+        // honour the requests to stop propagation at this window: this is
+        // used by the dialogs, for example, to prevent processing the events
+        // from the dialog controls in the parent frame which rarely, if ever,
+        // makes sense
+        if ( !(win->GetExtraStyle() & wxWS_EX_BLOCK_EVENTS) )
         {
             wxWindow *parent = win->GetParent();
-            if (parent && !parent->IsBeingDeleted())
+            if ( parent && !parent->IsBeingDeleted() )
                 return parent->GetEventHandler()->ProcessEvent(event);
         }
     }