#include <math.h>
-#include <stdint.h>
+#include <time.h>
+#include <inttypes.h>
#include "screenhack.h"
#ifdef HAVE_XSHM_EXTENSION
#ifdef HAVE_XSHM_EXTENSION
"*useSHM: True",
#endif /* HAVE_XSHM_EXTENSION */
-#ifdef USE_IPHONE
+#ifdef HAVE_MOBILE
"*ignoreRotation: True",
+ "*rotateImages: True",
#endif
0
};
XWindowAttributes XWinAttribs;
XGetWindowAttributes( pBumps->dpy, pBumps->Win, &XWinAttribs );
- pBumps->start_time = time ((time_t) 0);
+ pBumps->start_time = time ((time_t *) 0);
pScreenImage = XGetImage( pBumps->dpy, pBumps->source, 0, 0,
pBumps->iWinWidth, pBumps->iWinHeight,
Bumps->duration = get_integer_resource (dpy, "duration", "Seconds");
if (Bumps->delay < 0) Bumps->delay = 0;
if (Bumps->duration < 1) Bumps->duration = 1;
- Bumps->start_time = time ((time_t) 0);
+ Bumps->start_time = time ((time_t *) 0);
return Bumps;
}
}
if (!Bumps->img_loader &&
- Bumps->start_time + Bumps->duration < time ((time_t) 0)) {
+ Bumps->start_time + Bumps->duration < time ((time_t *) 0)) {
Bumps->img_loader = load_image_async_simple (0, Bumps->screen,
Bumps->Win, Bumps->source,
0, 0);
static Bool
bumps_event (Display *dpy, Window window, void *closure, XEvent *event)
{
+ SBumps *Bumps = (SBumps *) closure;
+ if (screenhack_event_helper (dpy, window, event))
+ {
+ Bumps->start_time = 0;
+ return True;
+ }
+
return False;
}