Mercurial > hg > xemacs-beta
diff 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 |
line wrap: on
line diff
--- a/src/menubar-x.c Mon Aug 13 11:25:03 2007 +0200 +++ b/src/menubar-x.c Mon Aug 13 11:26:11 2007 +0200 @@ -675,7 +675,6 @@ if (eev) { Position shellx, shelly, framex, framey; - Widget shell = XtParent (daddy); Arg al [2]; btn->time = eev->timestamp; btn->button = eev->event.button.button; @@ -683,9 +682,16 @@ btn->subwindow = (Window) NULL; btn->x = eev->event.button.x; btn->y = eev->event.button.y; - XtSetArg (al [0], XtNx, &shellx); - XtSetArg (al [1], XtNy, &shelly); - XtGetValues (shell, al, 2); + shellx = shelly = 0; +#ifndef HAVE_WMCOMMAND + { + Widget shell = XtParent (daddy); + + XtSetArg (al [0], XtNx, &shellx); + XtSetArg (al [1], XtNy, &shelly); + XtGetValues (shell, al, 2); + } +#endif XtSetArg (al [0], XtNx, &framex); XtSetArg (al [1], XtNy, &framey); XtGetValues (daddy, al, 2); @@ -855,9 +861,15 @@ } void +reinit_vars_of_menubar_x (void) +{ + last_popup_menu_selection_callback_id = (LWLIB_ID) -1; +} + +void vars_of_menubar_x (void) { - last_popup_menu_selection_callback_id = (LWLIB_ID) -1; + reinit_vars_of_menubar_x (); #if defined (LWLIB_MENUBARS_LUCID) Fprovide (intern ("lucid-menubars"));