aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-01-25 15:53:29 +0000
committerGerd Moellmann2000-01-25 15:53:29 +0000
commit7555d825715df23e8d7fd27356ae5394bb73a81b (patch)
tree5736ede2738ba09bdcdfee6b90e827d677489227 /src
parent381c798c151247d1266809344bb63f6d293f9775 (diff)
downloademacs-7555d825715df23e8d7fd27356ae5394bb73a81b.tar.gz
emacs-7555d825715df23e8d7fd27356ae5394bb73a81b.zip
(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 780e08e1756..ed48e79e1ed 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -189,7 +189,7 @@ static int menu_items_submenu_depth;
189 189
190/* Flag which when set indicates a dialog or menu has been posted by 190/* Flag which when set indicates a dialog or menu has been posted by
191 Xt on behalf of one of the widget sets. */ 191 Xt on behalf of one of the widget sets. */
192static int popup_activated_flag; 192int popup_activated_flag;
193 193
194static int next_menubar_widget_id; 194static int next_menubar_widget_id;
195 195
@@ -1149,7 +1149,6 @@ popup_activated ()
1149 return popup_activated_flag; 1149 return popup_activated_flag;
1150} 1150}
1151 1151
1152
1153/* This callback is invoked when the user selects a menubar cascade 1152/* This callback is invoked when the user selects a menubar cascade
1154 pushbutton, but before the pulldown menu is posted. */ 1153 pushbutton, but before the pulldown menu is posted. */
1155 1154
@@ -1159,7 +1158,27 @@ popup_activate_callback (widget, id, client_data)
1159 LWLIB_ID id; 1158 LWLIB_ID id;
1160 XtPointer client_data; 1159 XtPointer client_data;
1161{ 1160{
1161#ifdef USE_MOTIF
1162 ++popup_activated_flag;
1163#else
1162 popup_activated_flag = 1; 1164 popup_activated_flag = 1;
1165#endif
1166}
1167
1168/* This callback is invoked when a dialog or menu is finished being
1169 used and has been unposted. */
1170
1171static void
1172popup_deactivate_callback (widget, id, client_data)
1173 Widget widget;
1174 LWLIB_ID id;
1175 XtPointer client_data;
1176{
1177#ifdef USE_MOTIF
1178 --popup_activated_flag;
1179#else
1180 popup_activated_flag = 0;
1181#endif
1163} 1182}
1164 1183
1165/* Lwlib callback called when menu items are highlighted/unhighlighted 1184/* Lwlib callback called when menu items are highlighted/unhighlighted
@@ -1291,18 +1310,6 @@ menubar_selection_callback (widget, id, client_data)
1291 } 1310 }
1292} 1311}
1293 1312
1294/* This callback is invoked when a dialog or menu is finished being
1295 used and has been unposted. */
1296
1297static void
1298popup_deactivate_callback (widget, id, client_data)
1299 Widget widget;
1300 LWLIB_ID id;
1301 XtPointer client_data;
1302{
1303 popup_activated_flag = 0;
1304}
1305
1306/* Allocate a widget_value, blocking input. */ 1313/* Allocate a widget_value, blocking input. */
1307 1314
1308widget_value * 1315widget_value *