1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

The triple mystery of the missing tray icon

Discussion in 'Support' started by Juppycmd, Feb 16, 2015.

  1. Juppycmd

    Joined:
    Dec 10, 2014
    Messages:
    61
    Likes Received:
    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 :-)
     
  2. Joe Caverly

    Joined:
    Aug 28, 2009
    Messages:
    680
    Likes Received:
    8
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    I don't think TCC.EXE has a minimize to tray option!
     
  4. Juppycmd

    Joined:
    Dec 10, 2014
    Messages:
    61
    Likes Received:
    1
    Thanks, I'll use that in case something important has gone missing with a disappearing tcc window.

    That's your problem, right there - it minimizes to the tray anyway, and without any dedicated option to prevent this behavior.
     
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    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.
     
  6. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,855
    Likes Received:
    83
    Vince is right -- there isn't anything in TCC to minimize to the tray (there is in TCMD). It's not something that Windows supports for console apps.
     
  7. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    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?
     
  8. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,855
    Likes Received:
    83
    I don't know. Microsoft doesn't exactly over-document conhost's behavior.
     
  9. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    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.
     
  10. Juppycmd

    Joined:
    Dec 10, 2014
    Messages:
    61
    Likes Received:
    1
    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.
     

Share This Page