+ case Msg.WM_NCHITTEST: {
+ if (XplatUI.IsEnabled (Handle) && ActiveMenu != null) {
+ int x = LowOrder ((int)m.LParam.ToInt32 ());
+ int y = HighOrder ((int)m.LParam.ToInt32 ());
+
+ XplatUI.ScreenToMenu (ActiveMenu.Wnd.window.Handle, ref x, ref y);
+
+ // If point is under menu return HTMENU, it prevents Win32 to return HTMOVE.
+ if ((x > 0) && (y > 0) && (x < ActiveMenu.Rect.Width) && (y < ActiveMenu.Rect.Height)) {
+ m.Result = new IntPtr ((int)HitTest.HTMENU);
+ return;
+ }
+ }
+
+ base.WndProc (ref m);
+ return;
+ }
+
+ case Msg.WM_NCLBUTTONDOWN: {