If you click on an area of the window that cannot be dragged from, it raises it on mouse-down.
If you click on an area of the window that can be dragged on, it doesn’t raise if you start a drag, otherwise it raises it on mouse-up.
That’s the desired behaviour. I agree people didn’t really explain that clearly.
I haven’t looked into it for over 20 years but as I recall it is impossible to do this with X11. I have no idea if Wayland added some kind of support for this, but I would be quite surprised given how long it took them to do screenshots.
Part of the difficulty is that you need to somehow query an app on mouse-down if it might start a drag. I have no idea how Windows does that… but… they solved it decades ago.
So, Windows has fully optimal behaviour here:
If you click on an area of the window that cannot be dragged from, it raises it on mouse-down.
If you click on an area of the window that can be dragged on, it doesn’t raise if you start a drag, otherwise it raises it on mouse-up.
That’s the desired behaviour. I agree people didn’t really explain that clearly.
I haven’t looked into it for over 20 years but as I recall it is impossible to do this with X11. I have no idea if Wayland added some kind of support for this, but I would be quite surprised given how long it took them to do screenshots.
Part of the difficulty is that you need to somehow query an app on mouse-down if it might start a drag. I have no idea how Windows does that… but… they solved it decades ago.