Fixed X_GrabKeyboard error when using Qt4. Set minimum window size.

checkForKeyboardWidgetFocus method will be invoked after
the constructor and errors came up when using grabKeyboard in
the constructor.