GChristensen / enso-portable

Portable Enso Launcher community edition
Other
164 stars 46 forks source link

Opening windows with Enso Launcher 1.1 and 1.1.1 often open behind current ones and without getting focus #37

Closed UI-buff closed 1 week ago

UI-buff commented 2 weeks ago

Hello again.

Following on from my previous issue-ticket, the last part of it was unfortunately never resolved, and now I see that it has been closed. Specifically, the fact that almost 100% of the time, newly opened-by-Enso windows pop under existing ones, and/or without being focused.

@GChristensen I hope I'm not annoying you too much with this, but it remains a very frustrating issue to me, and I'd really like to fix it somehow. Is there anything that can be done? It's happens practically every time that the newly Enso-opened window is opened behind some other existing window, and even if not, it rarely gets focus. This has persisted in both 1.1 and the latest, 1.1.1.

I've tested Enso 1.1 on a fresh Windows Sandbox again now, and if I do an "open settings" and then "open notepad", the latter pops under the settings window and without gaining focus, every single time. Can you reproduce this? Interestingly, I can't get 1.1.1 to run on Windows Sandbox at all - it seems to install just fine, but when run, nothing visible happens. I'm on Win10 Pro 22H2, and using a 49" ultrawide monitor running 5120x1440, in case it matters. I did try repeating this experiment on a different PC with Enso 1.1 in Sandbox, on a 27" display running 2560x1440 - same result there. And again, Enso 1.1.1 wouldn't run in Sandbox.

I'm thinking the most obvious workaround/solution might be for me to add an extra call within your Python code, automatically issuing an "Enso go"-command to the any ewindow that has just been opened using "Enso open". Alas, I have no clue where and in which script to do so.

But really, I'd be thrilled to have any solution or workaround. Thanks in advance for your attention to this. If donations are possible again, please let me know how I can support you - Enso Launcher is one of the most important productivity tools to me.

GChristensen commented 2 weeks ago

Hi,

I was able to reproduce this in a Windows 21H2 in a virtual machine. The test on more modern Windows 10 in a real machine wasn't able to reproduce this. This may be somehow related to the status of Enso process. Is it considered foreground or not. This requires a deep investigation. As a quick fix it is indeed possible to forcefully bring opened window to front, but the solution is non-trivial. Windows will deny access to some system windows, such as one of the Settings app.

Use this quick fix file to replace the open.py of the open command: open.zip. It should be at /commands/open.py . It is not a production ready solution though...

GChristensen commented 2 weeks ago

It seems that I've found a good enough solution. The issue is fixed in v1.1.2. Please, report if it does not work.

UI-buff commented 1 week ago

Yes! V1.1.2 works for me too. Thanks so much for patching this! 😄 👍

Again, let me know if you're taking donations. This software is well worth paying for.