[MPlayer-dev-eng] Bugreport/Patch: x11 video backend has wrong geometry assumptions

jon jon at jonshouse.co.uk
Wed May 8 22:35:58 CEST 2013


> > AFAICT everything the "wait for map" hack is meant to do is to block
> > until the MapNotify arrives.  Unfortunately, there is no
> > XMaskTypedWindowEvent() but only XCheckTypedWindowEvent() in xlib. 


> I
> > think it could be emulated with poll() on ConnectionNumber() and
> > XCheckTypedWindowEvent(), but whether it's clean to have a potentially
> > infinitely growing events queue is another question.
This is just a plain bad idea.  Always pop the events from Q then simply
ignore those not relevant, it possible that the event is not for your
specific process, in that case just push it back into the Q.  

You can use XPeekEvent and look for the event in the Q, that is probably
best if you are waiting for MapNotify - but something somewhere must
always pop all events from the Q or you have a memory creep.

http://tronche.com/gui/x/xlib/event-handling/manipulating-event-queue/XPeekEvent.html

http://tronche.com/gui/x/xlib/event-handling/manipulating-event-queue/XPeekIfEvent.html

http://tronche.com/gui/x/xlib/event-handling/XPutBackEvent.html

Jon





More information about the MPlayer-dev-eng mailing list