mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
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:
parent
aeddc7b908
commit
418cae5d53
2 changed files with 15 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue