ConfigureNotify messages queuing up

Robert Shearman rob at codeweavers.com
Thu Dec 1 16:22:34 CST 2005


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;
>
>.
>.
>.
>
>wine_tsx11_lock();
>while(XCheckTypedWindowEvent(event->display,event->window,
>  ConfigureNotify,&more_events))
>{
>  event=& (more_events.xconfigure);
>  x = event->x, y = event->y;
>}
>wine_tsx11_unlock();
>
>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.

-- 
Rob Shearman




More information about the wine-devel mailing list