[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  ActivateClient() or DoCommand("MinimiseProgram") bug?
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

ActivateClient() or DoCommand("MinimiseProgram") bug?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Ked   Russia  (524 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (21,407 posts)  [Biography] 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
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] 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 :)
[Go to top] 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.


2,417 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]