]> code.delx.au - gnu-emacs/blobdiff - src/w32menu.c
Declare Fuser_full_name as Lisp_Object in advance to
[gnu-emacs] / src / w32menu.c
index a169e267e316f0dd015e9a2f05f7a56a92ada137..f77ce136fe2434a4e8be6e11487eb7120db53732 100644 (file)
@@ -1,4 +1,4 @@
-/* X Communication module for terminals which understand the X protocol.
+/* Menu support for GNU Emacs on the Microsoft W32 API.
    Copyright (C) 1986, 1988, 1993, 1994 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -1152,16 +1152,18 @@ cached information about equivalent key sequences.")
   if (! NILP (position))
     {
       /* Decode the first argument: find the window and the coordinates.  */
-      if (EQ (position, Qt))
+      if (EQ (position, Qt)
+         || (CONSP (position) && EQ (XCONS (position)->car, Qmenu_bar)))
        {
          /* Use the mouse's current position.  */
-         FRAME_PTR new_f = 0;
+         FRAME_PTR new_f = selected_frame;
          Lisp_Object bar_window;
          int part;
          unsigned long time;
          
          if (mouse_position_hook)
-           (*mouse_position_hook) (&new_f, &bar_window, &part, &x, &y, &time);
+           (*mouse_position_hook) (&new_f, 1, &bar_window, 
+                                   &part, &x, &y, &time);
          if (new_f != 0)
            XSETFRAME (window, new_f);
          else
@@ -1517,7 +1519,7 @@ check_mouse_other_menu_bar (f)
   Lisp_Object x, y;
   unsigned long time;
 
-  (*mouse_position_hook) (&new_f, &bar_window, &part, &x, &y, &time);
+  (*mouse_position_hook) (&new_f, 1, &bar_window, &part, &x, &y, &time);
 
   if (f == new_f && other_menu_bar_item_p (f, x, y))
     {