A long time ago now, on OS4 as it happens, I discovered an issue with ActivateWindow(). It doesn't return when the window is activated as expected. Because of how Intuition works with it's event timers refreshing every 10th of a second or so. This has caused me trouble when working on a commodity that pastes text into the input stream. In some cases, where focus is taken away from the window, by the time the original window has been activated has been too late and my paste has been blanked out.
I wonder if there is any way to activate a window and be sure it has activated? The simple way would be to just delay using Delay() or timer.device. So I could do that.
I'm also thinking that an input handler or Cx filter could do the job. Waiting for the window to turn up in the activate event. Then signal my process.
Is there another way to call ActivateWindow() and be sure the window is activated, without other work arounds and patches to the system?