- if (callback) {
- /* If we got here, we loaded synchronously even though they wanted async.
- */
- callback (screen, window, drawable, name_ret_2, &geom_ret_2, closure);
+ /* If we got here, we loaded synchronously, so we're done. */
+ callback (screen, window, drawable, name, &geom, closure);
+ if (name) free (name);
+}
+
+
+#elif defined(HAVE_ANDROID)
+
+/* Loads an image into the Drawable, returning once the image is loaded.
+ */
+static void
+load_random_image_android (Screen *screen, Window window, Drawable drawable,
+ void (*callback) (Screen *, Window, Drawable,
+ const char *name,
+ XRectangle *geom, void *closure),
+ void *closure)
+{
+ Display *dpy = DisplayOfScreen (screen);
+ XWindowAttributes xgwa;
+ XRectangle geom;
+
+ if (!drawable) abort();
+
+ XGetWindowAttributes (dpy, window, &xgwa);
+ {
+ Window r;
+ int x, y;
+ unsigned int w, h, bbw, d;
+ XGetGeometry (dpy, drawable, &r, &x, &y, &w, &h, &bbw, &d);
+ xgwa.width = w;
+ xgwa.height = h;