the thumbnail doesn't really show the distortion, but I'm sure it's there if that's what you are seeing.
Have you installed any dock altering software by any chance?
Otherwise, is it while running any particular software, like ram intensive programs, or is it random?
If you open up console while this is happening, is there anything unusual happening there?
I would run disk permissions repair, also, from your original install discs that came with your ibook, running a hardware test.
It may be graphics or ram related!
May also be a driver issue, which reinstalling 10.5.8 may resolve, but I would run the
Mac OS X 10.5.8 Combo Update as it tackles resolution issues in this update.