mijorus / smile

An emoji picker for linux, with custom tags support and localization. I'll also put some random emojis here πŸ¦πŸΎπŸ¦”πŸ¦‡
https://mijorus.it/projects/smile
GNU General Public License v3.0
237 stars 13 forks source link

UI hides in background after selecting Emoji #5

Closed manikandancode closed 2 years ago

manikandancode commented 2 years ago

OS: Ubuntu 21.10 Wayland

https://user-images.githubusercontent.com/46480489/156768269-071676c4-3ed2-4263-8a5b-d98da7697215.mp4

mijorus commented 2 years ago

Hi, let me first say that I am quite inexperienced with GTK πŸ˜…, anyway...

This behavior is by design: by hiding the window I keep the process running in the background which means it will open faster the next time you launch the application.

The typical use-case I have in mind is the one where a user would assign Smile to a keyboard shortcut in the system settings and use that shortcut to open the app.

I have observed about 0.4/0.8s performance improvement by using this trick, which btw has an impact on memory usage of around 70mb (there is probably some overhead caused by the flatpak), but I think is pretty manageable by a modern PC.

I think that Smile is the kind of tool for which the startup time is pretty important, so idk, maybe there are some more drawbacks I am not aware of... let me know what you think.

mijorus commented 2 years ago

I also wanna mention that pressing the ESC key has the same effect: the window will be hidden but the process would still be loaded in memory.

Clicking on the "βœ–οΈ" button btw really closes the application and quits the process.

manikandancode commented 2 years ago

behavior is by design

I think minimizing is better than hiding. It will also help to open the app easier for next emoji pick.

use that shortcut to open the hidden app UI

Ok . But need to learn or set that shortcut first.

mijorus commented 2 years ago

I think minimizing is better than hiding. It will also help to open the app easier for next emoji pick.

Personally, I don't think this would be a good user experience, because when you minimize the window your DE inevitably shows an animation that would break typing flow, as the sight would follow the window minimizing.

Ok . But need to learn or set that shortcut first.

This is really a good point.

1) I need to add a welcome window of some sort that informs the user about the feature. βœ… 2) Creating a shortcut on most of the DEs is quite easy, I doubt that a linux user does not know how to create a custom shortcut. Personally, I don't really like apps intercepting shortcuts, which, can interfere with the system, but rater have a single centralized panel where I can set and customize all of them. Apps like Diodon behave similarly, letting the user create his own shortcut as he wants.

Let me know what you think, Thanks

mijorus commented 2 years ago

behavior is by design

I think minimizing is better than hiding. It will also help to open the app easier for next emoji pick.

I have updated the app with a toggle to choose whether to hide the window or minimizing it.

By default, the previous behaviour will be set but you can easily change it by going into the preferences.