# HG changeset patch # User Gerd Moellmann # Date 948815609 0 # Node ID e575223479a1bc04c4474d0f70c40b3926fe58df # Parent b696009c65860614f9bc3d6dfd45c2787cc3dd23 (popup_activated_flag): Make externally visible. (popup_activate_callback) [USE_MOTIF]: Increment popup_activated_flag. (popup_deactivate_callback) [USE_MOTIF]: Decrement it. diff -r b696009c6586 -r e575223479a1 src/xmenu.c --- a/src/xmenu.c Tue Jan 25 15:52:54 2000 +0000 +++ b/src/xmenu.c Tue Jan 25 15:53:29 2000 +0000 @@ -189,7 +189,7 @@ /* Flag which when set indicates a dialog or menu has been posted by Xt on behalf of one of the widget sets. */ -static int popup_activated_flag; +int popup_activated_flag; static int next_menubar_widget_id; @@ -1149,7 +1149,6 @@ return popup_activated_flag; } - /* This callback is invoked when the user selects a menubar cascade pushbutton, but before the pulldown menu is posted. */ @@ -1159,7 +1158,27 @@ LWLIB_ID id; XtPointer client_data; { +#ifdef USE_MOTIF + ++popup_activated_flag; +#else popup_activated_flag = 1; +#endif +} + +/* This callback is invoked when a dialog or menu is finished being + used and has been unposted. */ + +static void +popup_deactivate_callback (widget, id, client_data) + Widget widget; + LWLIB_ID id; + XtPointer client_data; +{ +#ifdef USE_MOTIF + --popup_activated_flag; +#else + popup_activated_flag = 0; +#endif } /* Lwlib callback called when menu items are highlighted/unhighlighted @@ -1291,18 +1310,6 @@ } } -/* This callback is invoked when a dialog or menu is finished being - used and has been unposted. */ - -static void -popup_deactivate_callback (widget, id, client_data) - Widget widget; - LWLIB_ID id; - XtPointer client_data; -{ - popup_activated_flag = 0; -} - /* Allocate a widget_value, blocking input. */ widget_value *