ConfigureNotify messages queuing up
mikael at pointlab.se
Thu Dec 1 16:45:42 CST 2005
On Thu, 2005-12-01 at 16:22 -0600, Robert Shearman wrote:
> Mikael Lindqvist wrote:
> >Hello dear Wine developers,
> >I was using Flash MX under Wine yesterday and I noticed that when I
> >resize the window, the contents swirl around as resize messages get
> >processed. I thought that maybe this could be avoided if the code in
> >wine that processes ConfigureNotify messages from X and passes them on
> >to the windows application could be made to not forward all the
> >messages, but just the ones that mattered. I had a look at the source
> >where this takes place (in dlls/x11drv/winpos.c) and put the following
> >code in the X11DRV_ConfigureNotify function:
> >XEvent more_events;
> > ConfigureNotify,&more_events))
> > event=& (more_events.xconfigure);
> > x = event->x, y = event->y;
> >So what it does is that when processing ConfigureNotify messages it
> >checks the message queue if there are more ConfigureNotify messages
> >queued up, and only delivers the last one to the windows application.
> >And actually things ran a bit smoother with this code in place!
> >Maybe there are potential problems with this code, because it might mean
> >that messages gets delivered in the wrong order, but I have some ideas
> >how this could probably be taken care of. And also some other bits and
> >pieces should be fixed for this to work.
> >But what do you think about the idea, is it worth exploring further? In
> >that case I could submit a proper patch for this...
> I definitely think it is worth exploring further. I'm not sure that the
> messages could appear in the wrong order, as that would mean that you
> could never be sure about a window's actual size after resizing it.
I mean like this, say the message queue looks like this:
With the "oldest" at the bottom. The code will then search for newer
ConfigureNotify messages in the queue, and find it (the one at the top)
and deliver that to the application. So it will be delivered before the
"other message", whatever that might be, even though the other message
I don't know in which cases or which kind of messages that could
possible end up like this and if it could cause problems. I'm thinking I
could use XCheckIfEvent to go through the list and only apply the
tactics only if there are several ConfigureNotify in a row, not if there
are other messages in between. But I haven't tried this out yet.
More information about the wine-devel