-
Notifications
You must be signed in to change notification settings - Fork 72
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
[Anchors] Improve the auto position system to support all cases #194
Comments
I've tested the "auto position system" on others app, and not working either... And as always, thank you for your efforts and dedication... My best regards... |
I also don't know. I have some tricks.
This is what I don't like. If you disabled it, it mean that it is not good enough so need to be fixed |
Then, let's go for it... i will help you in any way i can!!! 👍 |
Great news... It sound promising... Keep doing!!! |
This is extremely complex. |
@cpasoft Do you use Windows 10 or 11? |
Uooohhh... It's look impressive! I've use both OS, but mainly Windows 10. |
We will have today or tomorrow first beta version. I also found that the new implementation using 10% GPU. |
I fixed the 10% GPU usage. Now it will use up to 1.5% according to my tests. |
Great news... Waiting for test it... 😃 |
I just finished the algorithm for Windows 11, including fixing all bugs that I found. I can release for now version that this will work only on Windows 11 |
@cpasoft This will work only on Windows 11 for now or in Windows 10 insider preview version. Let me know how it works. |
Today I moved both algorithms to interface Tomorrow I will implement logic for choosing which implementation to use based on the OS build and maybe also by user settings |
@cpasoft |
Thanks @gileli121 ... I have been very busy this last days. I'll install the new beta2 on Windows11 tomorrow. I'll let you know how it works to me... Great work my friend!!! :-D |
@cpasoft In addition, I optimized the code. Now instead of 1%-2% CPU usage, it uses 0% CPU in my computer. Try this version: |
Hello @gileli121 ....
It works very well to me... Tested with Notepad++. I'll do more test with others app, like Typora , but it seems to work very well... |
Tested in other aps, like typora... Everything works right by now... Thanks! |
@cpasoft Seems that the auto-position algorithm has a small bug when it tries to move the icons to the left side... In addition, there is a memory leak issue. If you will resize windows, the system in windowtop will reallocate memory for the capture and during the memory allocation, it did not clean the old used RAM. I will fix this bug also. Need also to see how it works when using multiple monitors. About Windows 10, it will take time. It depends on when the next Windows 10 update will be released. |
@cpasoft
Download beta 4 |
@cpasoft Try beta 5. It should be very close to final: Let me know how it works. |
@cpasoft any update please?
|
@cpasoft |
@cpasoft Download: |
@cpasoft Please try this beta: |
Hello @gileli121 ... |
@gileli121 , here you have the full error: |
let me know if you want me to try something |
@cpasoft I will check it |
Great!... :-) |
@cpasoft I need that you will do these steps:
Thanks. |
With this version the error window not appear... ;-) |
@cpasoft All it takes to reproduce it is to disable this option: I will make a fix now |
@cpasoft Let me know if it fixed. |
Perfect @gileli121 ... I'm downloading right now and I'll test it on Windows 10. |
On Windows 10 it's working flawlessly right now. No errors at all... |
I'm testing right now under windows 11. There are not error shown. I don't know if the orange error windows has been restored in this version, or the errors are only shown on the log. I'll enable the error log and see if there is something relevant there... |
Checking the windowtoplog.log, no errors has been found... |
@cpasoft So I will soon release new version |
@cpasoft I released because this time I am sure that it should be fine but I still ask to test just in case. |
Perfect... downloading right now in both OS (Windows 10 & 11)... |
Answering to myself... it is still working in this version. No errors has been found in Windows 10 neither Windows 11. All seems to work right, with & without the "stay away from text" option. |
@cpasoft |
@cpasoft Thanks for your effort in testing it! |
I'm using the last beta without any errors. Everything working right by now... |
Sometimes the auto-position system will fail to move the anchors away from texts or images.
Examples of such cases (reported by @cpasoft):
The reason is that the existing UI Automation API failed to detect the elements on the window below the anchors.
When the OS does not know what the window shows, it can't report to WindowTop where the texts are.
As a result, the system in WindowTop will not able to calculate available positions because it has no information about where the texts/images are located.
Until now, it was impossible to fix this issue.
But thanks to what found here: microsoft/Windows.UI.Composition-Win32-Samples#97 (comment)
It should be possible to screenshot the window silently and then use fallback logic that will try to map the location of empty spaces" (where there is no text/image) using image processing.
After the mapping is done, the system will know where to move the anchors
The text was updated successfully, but these errors were encountered: