Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] -t flag in Windows works inconsistently #40

Closed
thedaryen opened this issue Jun 17, 2021 · 3 comments
Closed

[BUG] -t flag in Windows works inconsistently #40

thedaryen opened this issue Jun 17, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@thedaryen
Copy link

Windows Hotkey is not actually working (or it works... sometimes?) I tried with the method suggested of setting a hotkey in a windows shortcut and adding the -t flag. Nyrna seems to open an instance when pressing the combination and closes immediately, but the foreground application isn't suspended. In some cases I did manage to get it to suspend, but pressing the hotkey again doesn't resume the process. Also tried created an AutoHotkey script to manage the hotkey but got the exact same result. It almost feels like Nyrna suspending itself and then closing itself, some kind of timing issue, I don't know.

Tested with Notepad, Microsoft Word, Game Super Meat Boy. Same inconsistent results.

@thedaryen
Copy link
Author

thedaryen commented Jun 17, 2021

After some additional testing, It actually does work... sometimes. I think it's interacting weirdly with other programs I have running on background. I tried closing most of them and it started working. Started opening background programs one by one (some authotkey scripts, Steam, Autohidemousecursor, Wallpaper engine etc) and testing to see if it still worked and it started gettting inconsistent. I can't nail it down to a single program, it's very inconsistent.

After a while, Nyrna -t started not doing anything. Some more tries and it started minimizing Notepad instead of actually suspending it. When suspend occurs correctly, the minimized window can't get restored, but this "fake suspend" that happens sometimes just minimizes without actually suspending and you can restore Notepad by just clicking on the minimized window on the taskbar. After some toggles, suspend started working again magically. It probably has something to do with what program Nyrna detects as the "foreground" one to suspend.

I'll keep testing to narrow down a consistently reproducible scenario, but as of right now my only way of getting it to trigger is to test multiple times at different intervals and with different apps running on background until it starts failing.

@Merrit
Copy link
Owner

Merrit commented Jun 17, 2021

Thanks for the issue! 👍
Very helpful of you to provide the extra info, much appreciated.

I can confirm something weird is going on, I am seeing a similar lack of reliability over here. I will do some debugging and add some tests for this as soon as I get some free time.

I also have a couple planned changes that will improve the performance / speed of this toggle process.

@Merrit Merrit added the bug Something isn't working label Jun 17, 2021
@Merrit
Copy link
Owner

Merrit commented Aug 9, 2021

I've had some time to work on this and done a major refactor of how this works.

There is now a system tray icon (toggle_active_hotkey.exe) that you need to run, thereafter it will sit in the system tray and listen for the Pause hotkey, and when triggered it will launch the process to suspend/resume the active window - no fussing with windows shortcuts or passing flags needed.

In my testing it is running much much faster & has been quite reliable. Will include a dev build here if you'd like to test it as well.
nyrna-windows-portable.zip

@Merrit Merrit mentioned this issue Aug 14, 2021
Merged
@Merrit Merrit closed this as completed Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants