After my MacBook Pro sleeps some gestures don't work anymore When I wake my MacBook Pro (mid 2012 - with Mountain Lion) from sleep, sometimes some complicated gesture doesn't work anymore with the Trackpad or Magic Mouse.

Changing screens (with 4 fingers with trackpad or with 2 fingers with the mouse), getting Mission Control with 4 fingers, dragging windows with 3 fingers: they all don't work.

Clicks, taps, two fingers gestures still work though.

I have tried to change the configuration of the trackpad but it doesn't work. 

Changing screen with Ctrl + Left Arrow or Right Arrow still work too.

What can I do to restart these features without restarting the computer (when I restart of course it works again like a charm)?
A workaround is to bring up Terminal and then type "killall Dock" at the prompt which restarts the dock. This fixes the problem. It’s odd that Apple have failed to pick up this bug at the last update. It seems to be pretty commonplace.