-
Notifications
You must be signed in to change notification settings - Fork 543
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
How can I do something when widget or window lose focus? #3250
Comments
I think it's currently not possible to hide the window when it looses focus. This is a feature we'd need to add.
One way to know the backend is to use SLINT_DEBUG_PERFORMANCE env variable. For example, set it to |
Thanks for your reply! SLINT_DEBUG_PERFORMANCE env variable is very helpful for me. However, the workarounds #112 (comment) do not work now.
The 'my_callback' method causes an error: Call of impure callback 'my-callback'. Now, I'm trying to implement this function with TouchArea, and really hope a "focus changing" callback (like ActivationChange event in Qt) can be added. (Maybe at least for FocusScope?) |
right, you need to annotate my_callback as
Yes, this would be a good addition: #1236 |
My platform is windows11, and using Slint with Rust.
I want to hide my window when it loss focus. But I can't find any callback or api to do so.
Please help me.
(ps: It is also difficult for me to change the backend of Slint. I try to change the SLINT_BACKEND environment variable of Windows11, but there is no change. How can I know what backend Slint is using?)
The text was updated successfully, but these errors were encountered: