On Thu, 25 Aug 2016 13:35:43 -0500, Ken Thomases wrote:
Hi,
Hi, (snip)
In process_events(), you use a variable named "queued" to hold the result of calls to event handlers. That implies that event handlers should only return true if they have posted or sent a Windows message or hardware input. But that doesn't seem to be what you've actually done in the event handlers. For example, in the first "if" statement in X11DRV_MapNotify(), you return true without queuing anything.
Instead, you seem to be returning true for some notion of "success" in handling events, but I'm not sure how that plays into the rationale for this patch. Am I misunderstanding something?
Ideally, event handlers should return FALSE if they succeed and nothing is posted or sent by them. However, at that time, I was afraid of introducing regressions, I limited return FALSE case if the handler completely fails. So, It's not perfect, yet. In other words, my patch allows the handler states it never posts/sends a message by returning FALSE. But returning TRUE doesn't mean there is a new message.
I also don't get why you changed the TRACE at the end of process_events(). The events really were processed. They aren't "ignored" just because they didn't result in messages or input being queued. Also, shouldn't the return type of process_events() be changed to BOOL?
Good point. I'll sent a patch in this weekend.
Thanks too, Akihiro Sagawa