Replies: 2 comments
-
set_foreground doesn't work at all, windows doesn't allow other apps steal focus, btw I will check how improve this later. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Since then, from testing it turned out "bring_to" cause apps to be "AlwaysOnTop" features like, so it does not help, but the set_Foreground works form me like a charm. I stash it, until I dig more in the topic... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
This is a question at first, because I do not get the reasons behind. For me, the "async_force_set_foreground" does not work as intended. Most of the time, when I try to switch window on taskbar, then my item not get focused, it got minimised. I digged it a bit, and found ,that the logical work in handler seems OK, but the method when I want to focus, calls "WindowsApi::async_force_set_foreground(hwnd)". This method in its content calls:
![image](https://private-user-images.githubusercontent.com/185695608/378373431-aba9500c-7871-41b4-9b84-8215a70999c7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzc1NTEsIm5iZiI6MTczOTE3NzI1MSwicGF0aCI6Ii8xODU2OTU2MDgvMzc4MzczNDMxLWFiYTk1MDBjLTc4NzEtNDFiNC05Yjg0LTgyMTVhNzA5OTljNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwODQ3MzFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hMjEyODQ0ZDA1NTkwZmJmMGYxYmQzYzFkZDgzNjg2MDQ4NTBiMDE5M2QxYTU2MTM2YTU3YTJhYzYxODgwYjNhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Sk9rm_Z5IzINwXMVGtkysiyAsRzZW0fR1XQoITONb9o)
The problem with this, this API enforce the state of minimised, and when it got the restore, it does not affect the window. If I replace this method with "SW_MINIMIZE", then it works perfectly, only it flashes and makes me crazy...
When I replaced the "async_force_set_foreground" with the real manner in its core, it works perfectly, without any flashes.
![image](https://private-user-images.githubusercontent.com/185695608/378379160-75c4f4a1-1904-4e8d-8bc8-d32a209f97b6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNzc1NTEsIm5iZiI6MTczOTE3NzI1MSwicGF0aCI6Ii8xODU2OTU2MDgvMzc4Mzc5MTYwLTc1YzRmNGExLTE5MDQtNGU4ZC04YmM4LWQzMmEyMDlmOTdiNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwODQ3MzFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kOTA5OGUwYWU2NjcyNWRiZTUzZDQwYjcxZDEzYTExNzlhMDJmMWVjNTY1MDVjNjA3Mjc1ODUwODg1ZDYzNzgzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Vof3JmoQ5iFs8efFy8RAT2eX9036rnBijBL4eH_Du0I)
Do you have a specific reason why you are use that exact method?
Beta Was this translation helpful? Give feedback.
All reactions