A window size/move fix (repost)
ovek at arcticnet.no
Tue Feb 18 20:09:39 CST 2003
ons, 2003-02-19 kl. 01:29 skrev Duane Clark:
> Alexandre Julliard wrote:
> > Duane Clark <dclark at akamail.com> writes:
> >> Before changing window size/pos, handle pending ConfigureNotify events.
> > That's only hiding the problem, and only in some cases. There is no
> > guarantee that the ConfigureNotify has arrived by the time we do the
> > resize, so we need to cope with a ConfigureNotify arriving at any
> > time.
> Okay, that will certainly be more ...err... challenging ;) I will see
> what I can do.
Also consider the current solution in WineX. It uses XPeekEvent inside
EVENT_ProcessEvent to detect a sequence of consecutive ConfigureNotify
events in the queue, and only process the last one. Since
EVENT_ProcessEvent is only called after the app is done with its window
management stuff and starts processing events, the last event is more
likely to have arrived by that time (at least in that game we had to do
this hack for, where the event loop started several seconds after a
bunch of window changes, which included showing/hiding, so we also try
to eliminate UnmapWindow/MapWindow pairs in the queue in WineX to avoid
getting the window minimized).
But it'd still not be reliable without being able to somehow track all
the pending ConfigureWindow/ConfigureNotify events, which is next to
impossible when dealing with an unknown window manager.
More information about the wine-devel