
--- SlideShow.pm~	Tue Jun 29 03:20:30 1999
+++ SlideShow.pm	Fri Jul 23 19:47:53 1999
@@ -5,7 +5,6 @@
 use Tk::After;
 use Tk::Animation;
 use Tk::Font;
-use X11::Protocol;
 
 use Tk::SlideShow::Dict;
 use Tk::SlideShow::Placeable;
@@ -116,7 +115,11 @@
   $present = bless { 'current' => 0, 'mw' => $m, 'fond'=>'ivory',
 		   'slides_names' => {}};
   # util pour forcer le dplaceement de la souris (pointer)
-  $xprot = X11::Protocol->new();
+  eval q{
+      use X11::Protocol;
+      $xprot = X11::Protocol->new();
+  };
+  warn $@ if $@;
   $H = $h || $m->Display->ScreenOfDisplay->HeightOfScreen;
   $W = $w || $m->Display->ScreenOfDisplay->WidthOfScreen;
   print ("H=$H, W=$W\n");
@@ -206,7 +209,8 @@
 #internals
 sub warppointer {
   my ($x,$y) = @_;
-  $xprot->WarpPointer(0, hex($can->id), 0, 0, 0, 0, $x, $y);
+  $xprot->WarpPointer(0, hex($can->id), 0, 0, 0, 0, $x, $y)
+      if $xprot;
 }
 
 # this sub create a popup window with key binding help

