At least on ubuntu karmic, the main window doesn't have focus when using present() from the global hotkey callback.
This seems to be a feature of the WM rather tham a bug: if the user didn't explicitly raise the window by a keyboard/mose event, it won't get focus.
Find a way around that.