Martchus / syncthingtray

Tray application and Dolphin/Plasma integration for Syncthing
https://martchus.github.io/syncthingtray/
Other
1.68k stars 44 forks source link

Flag for not creating console window on Windows #108

Closed sledgehammer999 closed 3 years ago

sledgehammer999 commented 3 years ago

Relevant components

Environment and versions

Bug description On Windows even if you use -no-console the OS still creates a console window for syncthing when it is launched, which afterwards syncthing deallocates due to the above switch. Aka there is a very brief period where the user sees a black console window. However, the launching process (aka syncthingtray) can indicate to the OS to not create a console window at all. So in your boost::process::child() you just have to pass boost::process::windows::create_no_window

I have tested it locally with a test program and it works with syncthing.

Martchus commented 3 years ago

It is very strange that I cannot reproduce this issue with -no-console. However, I suppose passing the boost argument cannot hurt so I'll add it.

sledgehammer999 commented 3 years ago

It is very strange that I cannot reproduce this issue with -no-console.

If your system is very fast(eg SSD) or under no load you won't notice. It is just a flicker on launch. I notice it more often on user logon because there are other things loading concurrently with syncthing and things get slowed a bit in those first seconds.

Martchus commented 3 years ago

That could be the case, indeed.


I added the flag on master. I'll test it tomorrow under Windows, here's a build if you like to test it: https://martchus.no-ip.biz/repo/experimental/win/syncthingtray-b828d7c27491b373faf58b5c239338f6529e335b.exe

Martchus commented 3 years ago

I have tested it locally with a test program and it works with syncthing.

So I'm confident it works although I couldn't reproduce the issue myself. Of course you can reopen the issue if it didn't work after all.

sledgehammer999 commented 3 years ago

I confirm that it works. Thank you.