I'm trying to use
window-configuration-change-hook in a package to perform some action when a buffer becomes visible for the first time. It works, however when starting Emacs,
switch-to-buffer as it is restoring buffers, which triggers
window-configuration-change-hook. I don't want that to count because the user doesn't actually see the the buffers as they are restored.
Is there a good way to avoid false positives from
desktop-mode? Or maybe a better way to detect when a buffer becomes visible?
My only current idea is to add a timer or something to ignore cases where the buffer is only "visible" for a very short period, but I don't really like that idea.