- data = Fgethash (make_int (id),
- FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f), Qnil);
-
- if (NILP (data) || UNBOUNDP (data))
+ image_instance = Fgethash (make_int (id),
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE1 (f), Qnil);
+ /* It is possible for a widget action to cause it to get out of sync
+ with its instantiator. Thus it is necessary to signal this
+ possibility. */
+ if (IMAGE_INSTANCEP (image_instance))
+ XIMAGE_INSTANCE_WIDGET_ACTION_OCCURRED (image_instance) = 1;
+ callback = Fgethash (make_int (id),
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE2 (f), Qnil);
+ callback_ex = Fgethash (make_int (id),
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE3 (f), Qnil);
+
+ if (!NILP (callback_ex) && !UNBOUNDP (callback_ex))
+ {
+ event = Fmake_event (Qnil, Qnil);
+
+ XEVENT (event)->event_type = misc_user_event;
+ XEVENT (event)->channel = frame;
+ XEVENT (event)->timestamp = GetTickCount ();
+ XEVENT (event)->event.eval.function = Qeval;
+ XEVENT (event)->event.eval.object =
+ list4 (Qfuncall, callback_ex, image_instance, event);
+ }
+ else if (NILP (callback) || UNBOUNDP (callback))