Ok more than likely all it needs is some maintenance. Such as repairing permissions, SafeBoot and a pram reset.
This PDF explains the permissions thing, it will open in your browser, you can save it for when you need it again.
One thing about 10.5.8 Leopard, repairing permissions is slow so please give it time.
Then the pram reset, this helps lots of things and will really improve performance.
To do a PRAM reset, you need to restart your machine and hold down these 4 keys.
‘Option’, ‘Command (Cloverleaf or Apple)’, ‘R’ and 'P'.
Keep them down until you hear 4 startup chimes. This is the sound it makes when starting up, like a bbbooonnnggg. The screen will also cycle.
This resets all of the system buses on your computer, USB, FireWire, display, ethernet and your keyboard/mouse/trackpad.
This will correct many faults but not necessarily yours.
The SafeBoot runs routines that sometimes are neglected especially if you turn your Mac off at night when they normally run.
To do a Safe Boot, restart and before the first chime press and hold the 'Shift' key.
Wait until you see the Apple logo and the spinning gear appear, then let go.
It can take as long as 20 minutes to load, so please be patient.
When the login screen appears it will say in red on the login window 'SafeBoot'.
Now login and give it a few more minutes to finish loading.
Try doing whatever it was it was giving you the problem. If it works then probably the problem is solved, so restart normally.
If the problem persists then restart normally also, other fixes will need to be done.
Try that and let me know if it is working now or not, it should be fine. Please take your time, I am in no hurry.