Benson and I took a crack at a problem we've run into several times
when working with toolbars. A toolbar won't automatically redisplay if
its icon or active-p value changes, as these aren't changes to the
specifier itself. So when we wanted to change a toolbar icon in
response to some user action (switching display modes in xpm-mode, for
instance) we had to do a some form of update kludge. The best we'd
found that worked in x and msw was:
(remove-specifier default-toolbar (current-buffer))
(sit-for 0)
(set-specifier default-toolbar xpm-toolbar (current-buffer))
Which is an ugly kludge. Today we tracked down the problem.
set-specifier-dirty-flag, the obvious solution, didn't work due to an
optimization in recompute_one_cached_specifier_in_window, in
specifier.c. It checked whether the instance of the new specifier was
eq the current value, and if so, skipped marking it for redisplay.
Unfortunately, that made it impossible to manually force redisplay of
a given specifier.
Here's a patch that will remove the optimization in TIP. Anecdotally
at least, it doesn't seem to cost much processor time, as the update
was only skipped a handful of times in a normal session.
Best,
Byrel Mitchell
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta