I've found something strange when using the ActivateClient() callback. If I use it after doing DoCommand("MinimiseProgram") while the client frame is active, then my toolbars (which I have arranged on one line to preserve space) get stacked one on top of another. This is especially strange because if the client is already minimised when DoCommand("MinimiseProgram") is called, then the toolbars stay in place after the ActivateClient() call.
To put it into perspective: I have an external display with a close button. When the close button is clicked, it hides the display frame and sends Mushclient a command to minimise itself (the DoCommand() is executed by a plugin). To bring both Mushclient and the display back up, I can doubleclick a tray icon, which shows the display and commands Mushclient to re-surface (ActivateClient() is called by the same plugin). Now, if I click on some icon (e.g. Firefox) in the task bar to push Mushclient to the background, then click the display's close button, and doubleclick the display's tray icon, then all goes well. Same thing when I click Mushclient's minimize button and then repeat the same sequence of actions with the display. But when I just click the display's close button directly and then dclick the tray icon, the toolbars get screwed up.
To put it into perspective: I have an external display with a close button. When the close button is clicked, it hides the display frame and sends Mushclient a command to minimise itself (the DoCommand() is executed by a plugin). To bring both Mushclient and the display back up, I can doubleclick a tray icon, which shows the display and commands Mushclient to re-surface (ActivateClient() is called by the same plugin). Now, if I click on some icon (e.g. Firefox) in the task bar to push Mushclient to the background, then click the display's close button, and doubleclick the display's tray icon, then all goes well. Same thing when I click Mushclient's minimize button and then repeat the same sequence of actions with the display. But when I just click the display's close button directly and then dclick the tray icon, the toolbars get screwed up.