OS X seems to get confused when I disconnect my MacBook from an external monitor. This confusion sometimes leads to the hot corners feature not working. This is definitely a bug in Leopard that needs fixing. Until that happens, restarting the Dock is a quick solution to the problem. This can be done through the Activity Monitor, but I think it’s easier to just run this script which I stole and modified:
#!/bin/sh DOCKPID=`ps aucx| grep Dock | awk '{ print $2; }'` kill $DOCKPID
or just: killall Dock