Originally posted by Weasel
View Post
Nothing you have said makes AutoHotkey the best.
Moving a window relative to another window means absolute positioning for YOUR SCRIPT because it's not relative to your script's window. In other words, it needs to know the absolute position of the target window so that it moves the other window relative to it. The script needs to know that window's absolute position to do this math.
All this really need is a common anchor point. Exactly why cannot the target window be the anchor and offset to other windows provide in that math format.
Weasel look at how Wayland popup work with xdg_positioner
Or take a good read of 249.
Question Weasel why is the script doing the maths using absolute position values in the first place. Remember between the time the script does the maths to work out where it should place window the absolute position data of the window can be out of date.
Relative position moves the final maths to the compositor. From top left conner of Z window place my Windows X/Y offset. This is how xdg_positioner is doing it for popup windows.
This is the problem Weasel absolute position information on an application windows be it X11 or Windows is always out of date. You have a race condition problem.
Doing relative position by having the compositor/output side process it means you avoid these screw ups.
Weasel think about what will know if a window has been moved.
Windows lacks relative positioning in any decent way.
What has the most current information of windows positioning?
Weasel answer the above question truthfully. Script using absolute position information does not have most current information of window positioning.
In Wayland the item is always the Wayland compositor with the most current information right.
There is a problem of course Weasel does not want to admit autohotkey has a flaw caused by OS it been operating on missing a feature.
The best pig ear is still a pigs ear Weasel. Best broken bit of software is still a broken bit of software.
Comment