On Wed Nov 29 16:41:34 2023 +0000, Paul Gofman wrote:
Are you sure that deleting parent whole_window is the only case for which synchronization is needed? E. g., X11DRV_Expose() handles events for client window, don't we want to make sure the current X window tree is synced as soon as client window is detached? Also, if we have, e. g., some resize or iconify of the whole window, while X still thinks that client window is its child, what happen to it?
I'm not sure because pretty much nothing is certain in this area, but if there's any need for additional XSync, it's not because of this MR and it is the case already, and should be added separately. As I don't have evidence that they are required I'm not going to add them now.
Regarding the events, this is why there also are XFlush before / after we call XSelectInput, making sure that we only register for Expose events on attached client windows. Of course, there may be pending events that we might receive later but is that even the case after XSelectInput deselected a window? There again I haven't yet seen any evidence it's happening.
Regarding resize / iconify of the top-level window, afaik it doesn't have any effect on the child. Resize of the client window is now done using the gdi_display as it should, since a6bc5f34b87393e04ff46659f518f2e7094cc7e4, and shouldn't need additional synchronization.