gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A question on discardEventsMatchingMask:beforeEvent:


From: Fred Kiefer
Subject: Re: A question on discardEventsMatchingMask:beforeEvent:
Date: Tue, 25 Jan 2011 22:03:31 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11

Yes, this seems to have changed in the documentation. Best we can do is
to write a few tests on Cocoa to see what the actual behaviour is and
then implement an addition method on GSDisplayServer if needed.

With regards to the event compression, could you please provide examples
how we could get the same effect to backend event compression with
application event compression without adjusting each and every existing
GNUstep application?

Fred

Am 25.01.2011 19:22, schrieb Banlu Kemiyatorn:
> Apple docs said that NSWindow -discardEventsMatchingMask:beforeEvent:
> should just forward to NSApp
> but a note on NSApplication -discardEventsMatchingMask:beforeEvent: states
> 
> "Typically, you send this message to an NSWindow object, rather than
> to the application object. Discarding events for a window clears out
> all of the events for that window only, leaving events for other
> windows in place."
> 
> out implementation in NSWindow is like
> 
> - (void) discardEventsMatchingMask: (unsigned int)mask
>                        beforeEvent: (NSEvent*)lastEvent
> {
>   [NSApp discardEventsMatchingMask: mask beforeEvent: lastEvent];
> }
> 
> wouldn't that mask the events off all windows?
> 
> What would be bad if we store all the events from server queue on a
> queue on NSApplication (so we don't need to fix op for server ?) and
> let the display server directly postEvent:atStart: to the app.
> Beside that it would allow applications to manipulate the event queue
> directly, like custom event flood filtering, I think that would ease
> the work on multiple input devices/points implementation in future as
> well.
> For the point of filtering, I am concerned of the point that tons
> unused NSEvents would be discarded anyway but I don't think it's
> backend's decision to decide what application developer would want.
> 
> Thanks
> Banlu Kemiyatorn
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]