X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=OSX%2Fosxgrabscreen.m;h=8de3a09cae63cd646fcb5d6f324444bc5d6b4c43;hp=9dc5001cd6169e26afe91f168d05e62004115767;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hpb=c70f94f648d51bb4828193124f325fa52b0e57f3 diff --git a/OSX/osxgrabscreen.m b/OSX/osxgrabscreen.m index 9dc5001c..8de3a09c 100644 --- a/OSX/osxgrabscreen.m +++ b/OSX/osxgrabscreen.m @@ -253,7 +253,7 @@ osx_grab_desktop_image (Screen *screen, Window xwindow, Drawable drawable, /* What a hack! On iOS, our application delegate, SaverRunner, grabs an image - of itself as a UIImage before creating the XScreenSaverView. + of itself as a UIImage before mapping the XScreenSaverView. In this code, we ask SaverRunner for that UIImage, then copy it to the root window. */ @@ -262,18 +262,12 @@ Bool osx_grab_desktop_image (Screen *screen, Window xwindow, Drawable drawable, XRectangle *geom_ret) { - - /* Just for a little variety, let's return colorbars every other time. */ - static int counter = 0; - if (counter++ & 1) - return False; - SaverRunner *s = (SaverRunner *) [[UIApplication sharedApplication] delegate]; if (! s) return False; if (! [s isKindOfClass:[SaverRunner class]]) - abort(); + return False; UIImage *img = [s screenshot]; if (! img) return False; @@ -444,16 +438,7 @@ osx_load_image_file (Screen *screen, Window xwindow, Drawable drawable, # else /* USE_IPHONE */ - /* It would be nice to select a random image from the Photo Album and - load that, but that looks like a gigantic pain in the ass, because - it's an asynchronous API, and might require manual authorization - by the user. (ALAssetsLibrary, enumerateGroupsWithTypes.) - - Possibly useful sample code to check out: - http://www.fiveminutes.eu/accessing-photo-library-using-assets-library-framework-on-iphone/ - - So, in the meantime, return False, acquire colorbars. - */ + /* This is handled differently: see grabclient.c and iosgrabimage.m. */ return False; # endif /* USE_IPHONE */