http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.14.tar.gz
[xscreensaver] / hacks / xteevee.c
index df4ce24ad772f7f544040967f3492d9fdfe9a7d6..11d1c03649ae2e1fef7c0a3d6475bbf765abd357 100644 (file)
@@ -26,6 +26,8 @@
 #include "screenhack.h"
 #include "colorbars.h"
 #include <X11/Xutil.h>
+#include <time.h>
+#include <sys/time.h>
 
 
 /* Defines *******************************************************************/
@@ -313,7 +315,9 @@ void xteevee_Roll(Display* x_Disp,Window x_Win,XWindowAttributes* x_WinAttr,
 void xteevee_Bars(Display* x_Disp,Window x_Win,XWindowAttributes* x_WinAttr,
       time_t hack_Time,Pixmap hack_Pm)
 {
-  draw_colorbars (x_Disp, x_Win, 0, 0, x_WinAttr->width, x_WinAttr->height);
+  draw_colorbars (x_WinAttr->screen, x_WinAttr->visual, x_Win,
+                  x_WinAttr->colormap,
+                  0, 0, x_WinAttr->width, x_WinAttr->height);
 
   /* Go! */
   if (hack_Time > 0)
@@ -360,7 +364,7 @@ void screenhack(Display* x_Disp,Window x_Win)
 
        /* Grab the screen to give us time to do whatever we want */
        XGetWindowAttributes(x_Disp,x_Win,&x_WinAttr);
-       grab_screen_image(x_WinAttr.screen,x_Win);
+        load_random_image (x_WinAttr.screen, x_Win, x_Win, NULL);
 
        x_GcVal.subwindow_mode = IncludeInferiors;
        x_Gc = XCreateGC(x_Disp,x_Win,GCSubwindowMode,&x_GcVal);