Add method to XGServer to avoid blocking the run loop when the X event

queue is not empty.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27275 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2008-12-10 20:30:09 +00:00
parent aeddc7b908
commit 418cae5d53
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2008-12-10 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/x11/XGServerEvent.m (-runLoopShouldBlock:): Add method to
avoid blocking the run loop when the X event queue is not empty.
2008-12-02 Richard Frith-Macdonald <rfm@gnu.org>
* GNUmakefile:

View file

@ -272,6 +272,16 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym)
}
#endif
- (BOOL) runLoopShouldBlock: (BOOL*)trigger
{
*trigger = YES; // Should trigger this event
if (XPending(dpy) > 0)
{
return NO; // Don't block
}
return YES;
}
- (void) receivedEvent: (void*)data
type: (RunLoopEventType)type
extra: (void*)extra