X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=OSX%2Fjwxyz-timers.m;h=6e478f61725b1104be9f66f54bf7761e8d3f0b8f;hp=0ad4630fb6a9eeb12d3409b829b3002f9c4a8d8b;hb=f8cf5ac7b2f53510f80a0eaf286a25298be17bfe;hpb=ec8d2b32b63649e6d32bdfb306eda062769af823 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); +}