The triple mystery of the missing tray icon

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Dec 10, 2014
63
1
#1
I'm using tcc.exe (v17 x64) directly, and with recent versions it insists on minimizing into the tray no matter what the tcmd ini directive is.

Well, so far so bad, but the probem is that occasionally...
a) there are two tray icons for the same process
b) and the real problem: sometimes tcc disappears completely and doesn't minimize into the tray. I don't know how to make the window visible again so I have to kill it with the task manager

But if you like fooling around, here's the reliable way to make tcc disappear at least on my win7 x64 system:
1. start a batch file that outputs to the console
2. mark a part of the tcc window with the mouse
3. minimize tcc - it minimizes to the task bar as the ini directive says (yay!)
4. restore tcc from the task bar
5. press enter to copy the selected text. boom - tcc is invisible :-)
 
#5
That's your problem, right there - it minimizes to the tray anyway, and without any dedicated option to prevent this behavior.
I don't think it's possible for TCC.EXE to do that on its own; tray minimization is not a feature of TCC, optional or otherwise. I'd suspect a plugin or a 3rd-party tray minimizing app.
 
#7
I wouldn't be surprised if you're using **MY** "4AUTOTRAY" plugin. After a quick test, I find that it behaves exactly as you describe ... if you minimize the console while it's in select mode (output suspended), then restore, then exit select mode, it disappears (actually, becomes hidden but with no tray icon). 4AUTOTRAY has a (hidden) window whose window process is fed by the same thread that calls InitializePlugin(). If that thread is suspended when the console is in select mode, it could explain the behavior (though I don't completely understand the mechanism). Maybe I can fix it by giving the 4AUTOTRAY window its own thread. But if all threads of a console process are suspended in select mode, then maybe there's nothing I can do. I'll look into it when I get time. Rex, do you know exactly what's suspended with the console is in select mode?
 
#9
I don't know. Microsoft doesn't exactly over-document conhost's behavior.
I could speculate ... during select mode, Windows will suspend any thread trying to do console I/O. As I said, my plugin was relying on some TCC thread to pump messages (notably, tray messages) and to set a WinEventHook. When I gave the plugin it's own thread to do those things, the behavior noted by Juppycmd went away. I still don't know if my plugin caused his complaint. Any third-party software which made the same oversight that I did would likely have the same problem.
 
Dec 10, 2014
63
1
#10
I wouldn't be surprised if you're using **MY** "4AUTOTRAY" plugin.
Oh no - you're correct, how embarrassing :-o ... I dumped all plugins into the tcc folder as I expected they're all command extensions and don't do anything unless explicitly requested. The mimimize to tray option of tcmd made me look in the wrong place. Now that I've removed the plugin, tcc minimizes to the taskbar as always - the tray option is too buggy for me.