la-jarre-a-son / midi-jar

MIDI Jar is a tool box for musicians, learners, streamers, that want to route MIDI message between devices, and display a piano or chords while playing, and integrate it on a video or on a Twitch stream.
http://midi-jar.ljas.fr/
MIT License
87 stars 9 forks source link

Start minimized option seems doesn't work #31

Closed gotthehot closed 11 months ago

gotthehot commented 11 months ago

Expected Behavior

Expect midi-jar to be minimized when launching at startup

midi-jar-start-minimized

Current Behavior

Every system restart I see midi-jar window like above screenshot.

Steps to Reproduce

  1. Restart system

Your Environment

ArTiSTiX commented 11 months ago

Hello @gotthehot,

In the task manager (Ctrl+Alt+Esc), there should be a tab about startup apps. If you add a column (by right clicking the table headers), you can see the command line of the startup apps. Can you confirm the command line for MIDI Jar is something like C:\Users\<your user>\AppData\Local\Programs\midi-jar\MIDI Jar.exe" --openAsHidden ? If not this is expected that it won't open as hidden.

Can you try toggling off and on the "Launch at startup" switch in the settings (sounds like an IT joke :p) ? I suspect there is a regression due to a fix i made a while ago for MacOS, but since I never changed this toggle on Windows, might have broken something.

gotthehot commented 11 months ago

There is no option --openAsHidden in command line:

midi-jar-minimize

Toggled both options to OFF - quit midi-jar - then ON but app still appears on startup and no changes in command line.

ArTiSTiX commented 11 months ago

Thanks @gotthehot for the bug report, this is indeed something not working as expected.

I will publish a patch soon, but i would like to pack it with other bug fixes if any, so i'll delay it.

Until the next patch version, i suggest to simply turn off then on the "Launch at startup" setting, that should fix the issue.

If you can confirm this fix is working, it will make sure that the patched version will not have the issue.

ArTiSTiX commented 11 months ago

@gotthehot humm, so toggling off n on the "Launch at startup" did not have any effect on the --openAsHidden argument ?

I have no idea why, and i cannot reproduce it (i'm working on Win10 Pro too).

But correct me if i'm wrong, it looks like the screenshot you posted is from the Processes tab of the task manager, no the Startup tab.

If midi jar is running and not killed, the processes tab will show ho you started midi jar (supposedly like any other app). But the Startup command line should run with the --openAsHidden to ensure first launch does not open any window.

The buggy part is only that the "Start minimized" toggle is not refreshing the command line, but Launch at Startup should correctly recreate the system startup entry.

gotthehot commented 11 months ago

Screenshot I've made was from Startup tab, not from Processes.

Just investigated in real time:

So the only way to get midi-jar 1.6.1 to minimize at startup is the sequence:

  1. Launch at startup to OFF
  2. Start minimized to ON
  3. Then turn Launch at startup to ON and here it is:

minimized-option

ArTiSTiX commented 11 months ago

@gotthehot I confirm this is the current behaviour, and it will be fixed in the next version.

Do not hesitate to report if, even with the argument is correctly set, you notice midi jar to show up at startup, because this is the most annoying behaviour that could happen (i personally hate that loopmidi is showing up and that there is no way to get around this, i wish loopmidi was open source so that i could include it in midi jar directly).

EDIT: actually i'm stupid, it's in the taskbar contextual menu of loopmidi... you can start it minimized ><

gotthehot commented 11 months ago

Just checked: when argument --openAsHidden is present midi-jar starts minimized as intended.

As for loopmidi thats my story too :) It takes some time for a user to find "start minimized" option it tray icon menu.

ArTiSTiX commented 11 months ago

Hello @gotthehot,

I published the 1.6.2 which patches this bug. Thanks for the report !