comparison src/gui-x.c @ 408:501cfd01ee6d r21-2-34

Import from CVS: tag r21-2-34
author cvs
date Mon, 13 Aug 2007 11:18:11 +0200
parents b8cc9ab3f761
children 697ef44129c6
comparison
equal deleted inserted replaced
407:ed6218a7d4d3 408:501cfd01ee6d
227 if (((EMACS_INT) client_data) == 0) 227 if (((EMACS_INT) client_data) == 0)
228 return; 228 return;
229 VOID_TO_LISP (data, client_data); 229 VOID_TO_LISP (data, client_data);
230 XSETFRAME (frame, f); 230 XSETFRAME (frame, f);
231 231
232 image_instance = XCAR (data);
233 callback = XCAR (XCDR (data));
234 callback_ex = XCDR (XCDR (data));
235
236 #if 0 232 #if 0
237 /* #### What the hell? I can't understand why this call is here, 233 /* #### What the hell? I can't understand why this call is here,
238 and doing it is really courting disaster in the new event 234 and doing it is really courting disaster in the new event
239 model, since popup_selection_callback is called from 235 model, since popup_selection_callback is called from
240 within next_event_internal() and Faccept_process_output() 236 within next_event_internal() and Faccept_process_output()
253 XEVENT (event)->event.eval.function = Qrun_hooks; 249 XEVENT (event)->event.eval.function = Qrun_hooks;
254 XEVENT (event)->event.eval.object = Qmenu_no_selection_hook; 250 XEVENT (event)->event.eval.object = Qmenu_no_selection_hook;
255 } 251 }
256 else 252 else
257 { 253 {
254 image_instance = XCAR (data);
255 callback = XCAR (XCDR (data));
256 callback_ex = XCDR (XCDR (data));
258 update_subwindows_p = 1; 257 update_subwindows_p = 1;
259 258
260 if (!NILP (callback_ex) && !UNBOUNDP (callback_ex)) 259 if (!NILP (callback_ex) && !UNBOUNDP (callback_ex))
261 { 260 {
262 event = Fmake_event (Qnil, Qnil); 261 event = Fmake_event (Qnil, Qnil);
292 DEVICE_X_MOUSE_TIMESTAMP (d) = DEVICE_X_GLOBAL_MOUSE_TIMESTAMP (d); 291 DEVICE_X_MOUSE_TIMESTAMP (d) = DEVICE_X_GLOBAL_MOUSE_TIMESTAMP (d);
293 #endif 292 #endif
294 if (!NILP (event)) 293 if (!NILP (event))
295 enqueue_Xt_dispatch_event (event); 294 enqueue_Xt_dispatch_event (event);
296 /* The result of this evaluation could cause other instances to change so 295 /* The result of this evaluation could cause other instances to change so
297 enqueue an update callback to check this. We also have to make sure that 296 enqueue an update callback to check this. */
298 the function does not appear in the command history.
299 #### I'm sure someone can tell me how to optimize this. */
300 if (update_subwindows_p && !NILP (event)) 297 if (update_subwindows_p && !NILP (event))
301 signal_special_Xt_user_event (frame, Qeval, 298 enqueue_magic_eval_event (update_widget_instances, frame);
302 list3 (Qlet,
303 list2 (Qthis_command,
304 Qlast_command),
305 list2 (Qupdate_widget_instances,
306 frame)));
307 } 299 }
308 300
309 #if 1 301 #if 1
310 /* Eval the activep slot of the menu item */ 302 /* Eval the activep slot of the menu item */
311 # define wv_set_evalable_slot(slot,form) do { \ 303 # define wv_set_evalable_slot(slot,form) do { \