X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=OSX%2Fjwxyz-timers.m;h=6e478f61725b1104be9f66f54bf7761e8d3f0b8f;hb=c70f94f648d51bb4828193124f325fa52b0e57f3;hp=0ad4630fb6a9eeb12d3409b829b3002f9c4a8d8b;hpb=c494fd2e6b3b25582375d62e40f4f5cc984ca424;p=xscreensaver diff --git a/OSX/jwxyz-timers.m b/OSX/jwxyz-timers.m index 0ad4630f..6e478f61 100644 --- a/OSX/jwxyz-timers.m +++ b/OSX/jwxyz-timers.m @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 2006 Jamie Zawinski +/* xscreensaver, Copyright (c) 2006-2012 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -12,11 +12,6 @@ /* This is the OSX implementation of Xt timers, for libjwxyz. */ -#import -#import -#import "jwxyz.h" -#import "jwxyz-timers.h" - //#define DEBUG_TIMERS //#define DEBUG_SOURCES @@ -30,6 +25,17 @@ #undef USE_COCOA_SOURCES +#import + +#ifdef USE_COCOA_SOURCES +# import +#endif + +#import "jwxyz.h" +#import "jwxyz-timers.h" + + + #ifdef DEBUG_TIMERS # define LOGT(str,arg1,arg2) NSLog(str,arg1,arg2) #else @@ -381,3 +387,17 @@ jwxyz_XtRemoveInput_all (Display *dpy) # endif /* !USE_COCOA_SOURCES */ } + + +XtInputMask +XtAppPending (XtAppContext app) +{ + return XtIMAlternateInput; /* just always say yes */ +} + +void +XtAppProcessEvent (XtAppContext app, XtInputMask mask) +{ + jwxyz_sources_data *td = display_sources_data (app_to_display (app)); + jwxyz_sources_run (td); +}