http://bugs.winehq.org/show_bug.cgi?id=20865
--- Comment #8 from Vincent Povirk madewokherd@gmail.com 2009-12-14 00:41:57 --- I wasn't on #wine-devel when you asked about this so I'll have to settle for writing what I know or can easily look up on the bug. :(
Wine's windowing system is odd in that it's controlled by two different servers: X and the wineserver. The position stored in wineserver is what programs see, and SetWindowPos actually updates BOTH positions (see set_window_pos and X11DRV_WindowPosChanged).
As you may have noticed, the ConfigureNotify event calls SetWindowPos (see the X11DRV_ConfigureNotify function).
Now, here's the fun part. We get a ConfigureNotify event every time the window moves, no matter who caused it. We ignore those events if the position we get matches the wineserver position.
And here's the really fun part. If we are behind in processing ConfigureNotify events, we may get a notify event for a PREVIOUS position, causing us to move the window BACK to that position. If we get two ConfigureNotify events in a row, for the same window, we will discard the old one (see merge_events), but that is no guarantee that the event we are processing is the most recent.
Unfortunately, I don't think there's any way to tell whether an event is due to Wine's configure request or something else.