Mercurial > hg > xemacs-beta
comparison src/menubar-x.c @ 424:11054d720c21 r21-2-20
Import from CVS: tag r21-2-20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:26:11 +0200 |
parents | 41dbb7a9d5f2 |
children |
comparison
equal
deleted
inserted
replaced
423:28d9c139be4c | 424:11054d720c21 |
---|---|
673 btn->display = XtDisplay (daddy); | 673 btn->display = XtDisplay (daddy); |
674 btn->window = XtWindow (daddy); | 674 btn->window = XtWindow (daddy); |
675 if (eev) | 675 if (eev) |
676 { | 676 { |
677 Position shellx, shelly, framex, framey; | 677 Position shellx, shelly, framex, framey; |
678 Widget shell = XtParent (daddy); | |
679 Arg al [2]; | 678 Arg al [2]; |
680 btn->time = eev->timestamp; | 679 btn->time = eev->timestamp; |
681 btn->button = eev->event.button.button; | 680 btn->button = eev->event.button.button; |
682 btn->root = RootWindowOfScreen (XtScreen (daddy)); | 681 btn->root = RootWindowOfScreen (XtScreen (daddy)); |
683 btn->subwindow = (Window) NULL; | 682 btn->subwindow = (Window) NULL; |
684 btn->x = eev->event.button.x; | 683 btn->x = eev->event.button.x; |
685 btn->y = eev->event.button.y; | 684 btn->y = eev->event.button.y; |
686 XtSetArg (al [0], XtNx, &shellx); | 685 shellx = shelly = 0; |
687 XtSetArg (al [1], XtNy, &shelly); | 686 #ifndef HAVE_WMCOMMAND |
688 XtGetValues (shell, al, 2); | 687 { |
688 Widget shell = XtParent (daddy); | |
689 | |
690 XtSetArg (al [0], XtNx, &shellx); | |
691 XtSetArg (al [1], XtNy, &shelly); | |
692 XtGetValues (shell, al, 2); | |
693 } | |
694 #endif | |
689 XtSetArg (al [0], XtNx, &framex); | 695 XtSetArg (al [0], XtNx, &framex); |
690 XtSetArg (al [1], XtNy, &framey); | 696 XtSetArg (al [1], XtNy, &framey); |
691 XtGetValues (daddy, al, 2); | 697 XtGetValues (daddy, al, 2); |
692 btn->x_root = shellx + framex + btn->x; | 698 btn->x_root = shellx + framex + btn->x; |
693 btn->y_root = shelly + framey + btn->y; | 699 btn->y_root = shelly + framey + btn->y; |
853 CONSOLE_HAS_METHOD (x, free_frame_menubars); | 859 CONSOLE_HAS_METHOD (x, free_frame_menubars); |
854 CONSOLE_HAS_METHOD (x, popup_menu); | 860 CONSOLE_HAS_METHOD (x, popup_menu); |
855 } | 861 } |
856 | 862 |
857 void | 863 void |
864 reinit_vars_of_menubar_x (void) | |
865 { | |
866 last_popup_menu_selection_callback_id = (LWLIB_ID) -1; | |
867 } | |
868 | |
869 void | |
858 vars_of_menubar_x (void) | 870 vars_of_menubar_x (void) |
859 { | 871 { |
860 last_popup_menu_selection_callback_id = (LWLIB_ID) -1; | 872 reinit_vars_of_menubar_x (); |
861 | 873 |
862 #if defined (LWLIB_MENUBARS_LUCID) | 874 #if defined (LWLIB_MENUBARS_LUCID) |
863 Fprovide (intern ("lucid-menubars")); | 875 Fprovide (intern ("lucid-menubars")); |
864 #elif defined (LWLIB_MENUBARS_MOTIF) | 876 #elif defined (LWLIB_MENUBARS_MOTIF) |
865 Fprovide (intern ("motif-menubars")); | 877 Fprovide (intern ("motif-menubars")); |