braden-w / whispering

https://whispering.bradenwong.com/
MIT License
182 stars 21 forks source link

The application's window is always in focus #137

Closed rkhrkh closed 3 days ago

rkhrkh commented 4 days ago

Another user posted:

Perhaps there can be a settings toggle to hold the window over all the other windows. I rather like being able to let it go behind my current working window and refocus when I stop recording. Right now it is just always sitting on top of my current window. I preferred the other behavior where it was not focused and would focus when recording, and then if the auto-paste feature was working, it would refocus and paste. It's currently not doing this.

I support this feature request. Even when the application window is minimized, it still interferes with the workspace. An optimization in this area would significantly improve user-friendliness and enable a more efficient workflow.

DavidGP commented 4 days ago

Yes please. Even more so, it would be very useful if Whispering could be simply minimized to the Windows tray instead of exiting when the close button is clicked.

Especially with the latest update that includes the two feedback sounds and the red recording icon in the tray, there's no longer a need to keep Whispering open as a window, and even less so in the foreground.

braden-w commented 3 days ago

Hey guys, thanks for the issue!

I completely forgot to include this in the release notes, but the reason that it's always on top is intentional for a strange reason 😅

TLDR, I had to make a compromise. Either I've made it always on top or I could have the application be completely unresponsive to keyboard shortcuts whenever it was minimized. At that point, minimizing it might as well have been the same as closing it because there is no way for the application to be accessible unless you brought it back to the foreground.

There is a strange bug, at least on macOS, where the application cannot access any keyboard shortcuts, or even bring itself back to the foreground whenever it's minimized or put in the background. I temporarily fixed it by having the window always be set to on top. That being said, It was unsatisfying, but I had no other option after several hours of attempting to debug the issue.

braden-w commented 3 days ago

That being said, I'll be taking a look into this and alternate methods now. Hopefully I can dodge or solve this bug with a new method!

DavidGP commented 3 days ago

Thanks for the Info Braden! That seems to be a bummer. FWIW, I'm minimizing Whispering to the Windows Tray using RBTray. Dictation, keyboard shortcuts and audio feedback still work perfectly (this is on Windows). Keep up the great work!

rkhrkh commented 3 days ago

The previous behavior, where the application would remain unfocused but would focus when recording, was, in my opinion, a very simple and perfect solution. I have reverted to version 3.4.0 because it's more convenient than having a window constantly occupying my workspace.

DavidGP commented 3 days ago

Not sure why the application would need foreground focus at all, since at least on Windows it perfectly works when tucked away in the Tray 💁🏼‍♂️

rkhrkh commented 3 days ago

In macOS version 3.4.0, I reduce the size of the application window. While dictating, I then see only the red indicator. Once I stop dictating, the window disappears again. I find it particularly useful that the focus of the window is maintained through the red indicator during dictation. This prevents the accidental deactivation of the application or forgetting to close it.

DavidGP commented 3 days ago

My experience is that even when the application window size is reduced, it does get in the way and covers up things on the screen. Another problem is that I can't seem to move it anymore when it's reduced because there is no grabbing space left on the titlebar.

Anyway, I don't believe we need a foreground window with a red indicator anymore as long as the indicator is visible in the Windows tray. Not sure whether there is a similar place in macOS though.

Also, the distinguishable audible feedback when switching on and off helps immensely to be aware of the status of the application.

-- This post was dictated with great enjoyment using the awesome Whispering App

rkhrkh commented 3 days ago

Introducing an indicator in the system tray area would also optimize the application's usage on macOS, as an open window to display the activity would no longer be necessary. The described control function of the red indicator in the active window, which signals the application's operating status, could then also be implemented via the system tray.

braden-w commented 3 days ago

Hey guys, ran a cargo clean and reinstalled dependencies and now global shortcuts are working again! I'm going to push another release to fix this. Notably however, sound does not play when window is in background—working on a fix.

braden-w commented 3 days ago

Introducing an indicator in the system tray area would also optimize the application's usage on macOS, as an open window to display the activity would no longer be necessary. The described control function of the red indicator in the active window, which signals the application's operating status, could then also be implemented via the system tray.

@rkhrkh Definitely agree as this was the reason why the system tray was introduced in the first place—it's just that the aforementioned bugs persisted even when there was a tray icon which was super frustrating. Hopefully resolved in next release.