aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann <[email protected]>2000-01-25 15:53:29 +0000
committerGerd Moellmann <[email protected]>2000-01-25 15:53:29 +0000
commit7555d825715df23e8d7fd27356ae5394bb73a81b (patch)
tree5736ede2738ba09bdcdfee6b90e827d677489227 /src
parent381c798c151247d1266809344bb63f6d293f9775 (diff)
(popup_activated_flag): Make externally visible.
(popup_activate_callback) [USE_MOTIF]: Increment popup_activated_flag. (popup_deactivate_callback) [USE_MOTIF]: Decrement it.
Diffstat (limited to 'src')
-rw-r--r--src/xmenu.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 780e08e175..ed48e79e1e 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -189,7 +189,7 @@ static int menu_items_submenu_depth;
/* 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 @@ popup_activated ()
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 @@ popup_activate_callback (widget, id, client_data)
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 @@ menubar_selection_callback (widget, id, client_data)
}
}
-/* 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 *