This further increases Xinerama support with slideshow.  Prior to this
patch occasionally the two "zones" (Monitors) would be come in sync,
and would have the same background.  I believe the cause of this was
that they slideshows were initialized at the same time, and had the
same rand seeds.  This patch simply adjusts the seed by the GCC ID.
Its one of the only things I could think of that would cause the two
to have different seeds.  If this is too "hackish" feel free to let me
know if theres any superior way of doing it.
Index: e_mod_main.c
===================================================================
RCS file: /var/cvs/e/e_modules/slideshow/e_mod_main.c,v
retrieving revision 1.44
diff -u -r1.44 e_mod_main.c
--- e_mod_main.c	30 Dec 2006 23:34:00 -0000	1.44
+++ e_mod_main.c	16 Jan 2007 23:48:55 -0000
@@ -92,7 +92,7 @@
 	_slide_get_bg_count(inst);
 	if(ci->random_order)
 	  {
-	     srand(time(NULL));
+             srand(time(NULL) + atoi(inst->gcc->id) * 100);
 	     inst->index = (rand() % (inst->bg_count+1));
 	  }
 	else
@@ -446,7 +446,7 @@
 	     _slide_set_bg(inst, bg);
 	     if(ci->random_order)
 	       {
-		  srand(time(NULL));
+                  srand(time(NULL) + atoi(inst->gcc->id) * 100);
 		  inst->index = (rand() % (inst->bg_count+1));
 	       }
 	     else
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to