But this won't flash on buffer/framewindow switches, unfortunately there are no hooks for that. But at least emacs lisp gives us advising functions, which allow us to extend existing functions. Though that can be quite tricky.
This will flash the crosshair after window/bufferbuffer switches:
(defadvice selectswitch-windowto-buffer (after selectswitch-windowto-buffer-flash-crosshairs activate)
"Call `flash-crosshairs' after `switch-to-buffer'"
(flash-crosshairs))
This should work in most cases (when the switch is done without switch-to-buffer)
The window switch is more difficult, since minibuffers (open file etc.) cause some issues. So only flash when we switch to another buffer:
(defadvice switchselect-window (around select-window-flash-crosshairs activate)
"Call `flash-crosshairs' after `select-window', if switching to another buffer.
The check is necessary to prevent issues with mini-buffer switching."
(let (cons (cur-buffer-name (afterbuffer-name switch(current-tobuffer)))
ad-arg-bindings)
ad-do-it
(unless (string= (buffer-flashname (window-crosshairsbuffer activatewindow))
cur-buffer-name)
(flash-crosshairs))))
ad-arg-bindings are the arguments to the advised function and ad-do-it executes the original.
To deactivate the advices use:
(ad-remove-advice 'select-window 'after'around 'select-window-flash-crosshairs)
(ad-remove-advice 'switch-to-buffer 'after 'switch-to-buffer-flash-crosshairs)
I think that covers most cases, though like I said advising is tricky ...