On Tue Oct 22 15:47:50 2024 +0000, Paul Gofman wrote:
The mouse message should go after WM_WINDOWPOSCHANGED (and obviously other messages induced by that or anything between apply_window_pos server call and this place). I think that was good to additionally verify that it is not an effect of SendMessage vs PostMessage but no, message posted in WM_WINDOWPOSCHANGED handling arrives before this WM_MOUSEMOVE. So I think coalescing that with some earlier server call requires complete overhaul of set_window_pos() with moving all the handling there. That might be problematic (or nontrivial at least) because of multiple sent and waited messages on the way. In the current way it works there is a lot of server calls on a way of set_window_pos(), it seems to me an extra (essentially) posted message won't change much.
Also mind that the new message is only sent if the window position actually changes, that is probably not the most hot path, not sanely possible for an app to change some window position each frame without inducing much bigger issues.