|
|
|
@ -439,11 +439,19 @@ void UBPlatformUtils::showFullScreen(QWidget *pWidget) |
|
|
|
|
|
|
|
|
|
void UBPlatformUtils::showOSK(bool show) |
|
|
|
|
{ |
|
|
|
|
Q_UNUSED(show); |
|
|
|
|
|
|
|
|
|
if (show) { |
|
|
|
|
QString windir = qgetenv("WINDIR"); |
|
|
|
|
QString osk_path = windir+"\\System32\\osk.exe"; |
|
|
|
|
|
|
|
|
|
QProcess newProcess; |
|
|
|
|
newProcess.startDetached("explorer.exe", QStringList() << osk_path); |
|
|
|
|
QProcess oskProcess; |
|
|
|
|
// We have to pass by explorer.exe because osk.exe can only be launched
|
|
|
|
|
// directly with administrator rights
|
|
|
|
|
oskProcess.startDetached("explorer.exe", QStringList() << osk_path); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
else { |
|
|
|
|
HWND oskWindow = ::FindWindow(TEXT("OSKMainClass"), NULL); |
|
|
|
|
if (oskWindow) |
|
|
|
|
PostMessage(oskWindow, WM_SYSCOMMAND, SC_CLOSE, 0); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|