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

Minimize to tray / Right-click window buttons #401

Open
vertigo220 opened this issue Dec 7, 2024 · 3 comments
Open

Minimize to tray / Right-click window buttons #401

vertigo220 opened this issue Dec 7, 2024 · 3 comments

Comments

@vertigo220
Copy link

Given the functionality this provides and how related it is, it would be nice if it also provided the functionality of RBTray, that is, to minimize windows to the tray, preferably with a similar option to do so by right-clicking the minimize button. And related to that, it would be nice to be able to simply right-click the maximize button to toggle always-on-top.

@gileli121
Copy link
Member

@vertigo220
Right-click on the minimize button? That sounds interesting because the OS doesn’t typically handle right-clicks on the minimize button—it only shows a right-click menu when done on the title bar.

This seems like an unused space we could leverage to inject the WindowTop right-click menu. It’s an excellent idea! It could even serve as a secondary option, in addition to the regular toolbar.

Thank you very much for this great suggestion.

Regarding the implementation of "minimize to tray," it could be added as an option in this right-click menu.
Do you think adding such a button to the toolbar would also be a good idea?

If I include this as a toolbar button, it would be disabled by default (configurable in toolbar settings). I’m leaning towards implementing it only in the right-click menu, as adding a button to the toolbar feels a bit excessive.

Still, I’m unsure why exactly—it might actually deserve a place in the toolbar as a new button.

I’d love to hear your feedback on this as well.

@vertigo220
Copy link
Author

First of all, a word of caution regarding this. I've found that RBTray is apparently flagged by EAC (Epic Anti-Cheat), I assume due to how it hooks into the window in a "suspicious" way that could indicate cheating. Unfortunately, though it was reported by somebody months ago, Epic has not fixed it, and it doesn't seem likely they will, so I have to stop RBTray in order to play a game that uses EAC, otherwise the game runs horribly. I haven't been able to test yet whether this app's functionality is interpreted similarly by EAC, but if it's not, it's possible doing something similar to RBTray may cause it to be. I suspect, based on what you said, it's how RBTray enables right-clicking on the minimize button that triggers EAC, in which case it's probably best to make that an option so users can disable that functionality entirely if they run into issues, and add a warning along with it.

As for how to implement it, I'm always a fan of options, understanding of course that too many options can cause increased code complexity and/or make things too confusing for users. That said, I personally would like to be able to right-click directly on the minimize button for sending to tray and on the maximize button for toggling always-on-top, as it's much quicker than hovering, waiting (even for just 0500-1000ms) for a pop-up, taking another second to recognize which toolbar button I need and move the mouse to it, and clicking. It's only a difference of a couple seconds, but I prefer to be able to move quickly and smoothly, not pausing and waiting to do stuff like this. Of course, for those that prefer to use a menu, the option should be there, as it currently is, to choose which functions to include, with this being one of the choices.

If the hooking necessary to enable right-click on the minimize button is what triggers EAC, as mentioned it's probably best to proceed with caution with that, making it something that can be disabled, or perhaps not even bothering, though I think it would be nice functionality for those unaffected by that. But otherwise, minimize to tray could easily be another button in the toolbar.

@gileli121
Copy link
Member

gileli121 commented Dec 9, 2024

@vertigo220

Thank you for the feedback. Regarding what you mentioned about the hook:
WindowTop does not perform any hook, so such an issue is not expected.

However, it’s an interesting point because I plan to update the code in the future to be more event-driven, which could involve a form of hooking (more on this topic here: #369 (comment) .

Thank you for bringing this to my attention. When I work on #369, I will make sure to check that it doesn’t cause issues with anti-cheating app protections.

I think the minimize to tray feature could be a good candidate for future development since it’s not very complex to implement, and several users have requested it (likely more than two). I’ll consider whether to add it to the roadmap.

Regarding the trigger method, I might indeed add it as another button in the toolbar, disabled by default.

Thanks again for your suggestions and feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants