comparison src/menubar-msw.c @ 298:70ad99077275 r21-0b47

Import from CVS: tag r21-0b47
author cvs
date Mon, 13 Aug 2007 10:39:40 +0200
parents e11d67e05968
children 03446687b7cc
comparison
equal deleted inserted replaced
297:deca3c1083ac 298:70ad99077275
631 menu_cleanup (f); 631 menu_cleanup (f);
632 632
633 /* Ok, this is our one. Enqueue it. */ 633 /* Ok, this is our one. Enqueue it. */
634 get_gui_callback (data, &fn, &arg); 634 get_gui_callback (data, &fn, &arg);
635 XSETFRAME (frame, f); 635 XSETFRAME (frame, f);
636 mswindows_enqueue_misc_user_event (frame, fn, arg); 636 /* this used to call mswindows_enqueue_misc_user_event but that
637 breaks customize because the misc_event gets eval'ed in some
638 cicumstances. Don't change it back unless you can fix the
639 customize problem also.*/
640 enqueue_misc_user_event (frame, fn, arg);
641 mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE);
637 642
638 UNGCPRO; /* data */ 643 UNGCPRO; /* data */
639 return Qt; 644 return Qt;
640 } 645 }
641 646
734 else 739 else
735 pt.x = pt.y = 10; 740 pt.x = pt.y = 10;
736 741
737 if (SYMBOLP (menu_desc)) 742 if (SYMBOLP (menu_desc))
738 menu_desc = Fsymbol_value (menu_desc); 743 menu_desc = Fsymbol_value (menu_desc);
744 CHECK_CONS (menu_desc);
745 CHECK_STRING (XCAR (menu_desc));
739 746
740 current_menudesc = menu_desc; 747 current_menudesc = menu_desc;
741 current_hashtable = Fmake_hashtable (make_int(10), Qequal); 748 current_hashtable = Fmake_hashtable (make_int(10), Qequal);
742 menu = create_empty_popup_menu(); 749 menu = create_empty_popup_menu();
743 Fputhash (hmenu_to_lisp_object (menu), Qnil, current_hashtable); 750 Fputhash (hmenu_to_lisp_object (menu), Qnil, current_hashtable);
744 top_level_menu = menu; 751 top_level_menu = menu;
745 752
753 /* see comments in menubar-x.c */
754 if (zmacs_regions)
755 zmacs_region_stays = 1;
756
746 ok = TrackPopupMenu (menu, 757 ok = TrackPopupMenu (menu,
747 TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, 758 TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON,
748 pt.x, pt.y, 0, 759 pt.x, pt.y, 0,
749 FRAME_MSWINDOWS_HANDLE (f), NULL); 760 FRAME_MSWINDOWS_HANDLE (f), NULL);
750 761