[ros-diffs] [mjmartin] 36950: - Do not send the WM_MOUSEACTIVATE message for a window that has no parent. - Fixes visual basic application crashes when clicking on form. See bug #3111 for more details.

mjmartin at svn.reactos.org mjmartin at svn.reactos.org
Sat Oct 25 18:08:59 CEST 2008


Author: mjmartin
Date: Sat Oct 25 11:08:59 2008
New Revision: 36950

URL: http://svn.reactos.org/svn/reactos?rev=36950&view=rev
Log:
- Do not send the WM_MOUSEACTIVATE message for a window that has no parent.
- Fixes visual basic application crashes when clicking on form. See bug #3111 for more details.

Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/message.c

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/message.c?rev=36950&r1=36949&r2=36950&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Sat Oct 25 11:08:59 2008
@@ -597,7 +597,14 @@
    }
 
    Parent = IntGetParent(MsgWindow);//fixme: deref retval?
-   /* fixme: abort if no parent ? */
+
+   /* If there is no parent, do not send the WM_MOUSEACTIVATE message. Fixes Bug #3111 */
+   if (!Parent)
+   {
+      co_IntMouseActivateWindow(MsgWindow);
+      return FALSE;
+   }
+
    Result = co_IntSendMessage(MsgWindow->hSelf,
                               WM_MOUSEACTIVATE,
                               (WPARAM) (Parent ? Parent->hSelf : NULL),



More information about the Ros-diffs mailing list