Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Bug reports
➜ ActivateClient() or DoCommand("MinimiseProgram") bug?
ActivateClient() or DoCommand("MinimiseProgram") bug?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Ked
Russia (524 posts) Bio
|
Date
| Thu 10 Nov 2005 11:16 AM (UTC) |
Message
| 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. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 11 Nov 2005 07:40 PM (UTC) |
Message
| If I type this into the command window:
/DoCommand("MinimiseProgram")
Then everything seems OK. I think you have set up a sequence of events where the code that saves the toolbar positions is confused somehow by minimizing the program when it isn't active.
The code to do that is hidden away in the MFC (Microsoft Foundation Class) libraries, and will be hard to find. Can you work around it somehow by activating MUSHclient before minimizing it, or something? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Ked
Russia (524 posts) Bio
|
Date
| Reply #2 on Fri 11 Nov 2005 08:34 PM (UTC) |
Message
| Actually, it seems that the cause is in my display... in some weird way, as it's in no way connected to Mushclient other than through a UDP socket. But the only way to reproduce that bug is to transfer the focus from Mushclient's frame to my display's frame just as you click its' (the display's) Hide button. In other words - the focus has to shift from Mushclient to the display directly. If the display gains focus from anything other than Mushclient then all is fine.
And I don't even have a theory for why that works the way it does. Maybe MFC is indeed doing something, but it has to be doing something very strange it seems. Though now that I think about it, since I am using wxWidgets I am also using MFC, so it's MFC talking to MFC here. Looks like we did find a scapegoat :) | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
10,344 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top