X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=utils%2Fgrabclient.c;h=a0a19f34dbf53286dbbcd8d77d2b8490b5468e8b;hp=45053e9a6720664cae885c462eace6f445f00dc4;hb=f8cf5ac7b2f53510f80a0eaf286a25298be17bfe;hpb=ec8d2b32b63649e6d32bdfb306eda062769af823 diff --git a/utils/grabclient.c b/utils/grabclient.c index 45053e9a..a0a19f34 100644 --- a/utils/grabclient.c +++ b/utils/grabclient.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1992-2011 Jamie Zawinski +/* xscreensaver, Copyright (c) 1992-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 @@ -693,6 +693,14 @@ load_random_image_1 (Screen *screen, Window window, Drawable drawable, Bool done = False; XRectangle geom_ret_2; char *name_ret_2 = 0; + +# ifdef USE_IPHONE + /* Currently, only screen-grabbing is implemented, not loading of + images from the iPhone Photo Library. See osxgrabscreen.m. + */ + deskp = True; + filep = False; +# endif if (!drawable) abort(); @@ -739,10 +747,11 @@ load_random_image_1 (Screen *screen, Window window, Drawable drawable, } if (deskp && !done) { - osx_grab_desktop_image (screen, window, drawable); - if (name_ret) - *name_ret = strdup ("desktop"); - done = True; + if (osx_grab_desktop_image (screen, window, drawable, &geom_ret_2)) { + if (name_ret) + *name_ret = strdup ("desktop"); + done = True; + } } if (! done)