Fix hotkeys in Linux and Mac OS X (properly this time).

This is needed to fix the hotkeys on those platforms.

Proper fix this time, in the end I was unable to merge the two code paths since the behaviour is very different between these platforms.

Note that the panel is now actually used for rendering instead of obscuring the renderer. So there is no way for the same problem to happen on Linux and Mac OS X.