summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Bataron <baratosha23@gmail.com>2014-10-07 19:13:09 +1100
committerVladislav Bataron <baratosha23@gmail.com>2014-10-07 19:13:09 +1100
commitf820851738f7c2f75717fe1ba60945eec9dc829d (patch)
treeb4e4909405c8d26be37cd283e44ea0975b19ddf7
parentbdc1fabe78ad6d6053893f60b1c5308c46f4af8e (diff)
Showing the touch keyboard on the device only with windows 8stellarium
-rw-r--r--src/gui/StelDialog.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/gui/StelDialog.cpp b/src/gui/StelDialog.cpp
index 5f4fc249ee..c200ddd1dd 100644
--- a/src/gui/StelDialog.cpp
+++ b/src/gui/StelDialog.cpp
@@ -183,17 +183,25 @@ void StelDialog::showTouchKeyboard(bool show)
if (StelApp::getInstance().getSettings()->value("gui/flag_enable_touch_keyboard", false).toBool() == false)
return;
- if (show)
- {
- ShellExecuteA(NULL, "open", "\"C:\\Program Files\\Common Files\\microsoft shared\\ink\\TabTip.exe\"", "", 0, SW_NORMAL);
- }
- else
- {
- HWND wKB = ::FindWindow(_TEXT("IPTip_Main_Window"), NULL);
- if (wKB != NULL && ::IsWindowVisible(wKB))
- {
- ::PostMessage(wKB, WM_SYSCOMMAND, SC_CLOSE, 0);
+ switch (QSysInfo::WindowsVersion){
+ case QSysInfo::WV_6_3:
+ case QSysInfo::WV_6_2:
+ {
+ if (show)
+ {
+ ShellExecuteA(NULL, "open", "\"C:\\Program Files\\Common Files\\microsoft shared\\ink\\TabTip.exe\"", "", 0, SW_NORMAL);
}
+ else
+ {
+ HWND wKB = ::FindWindow(_TEXT("IPTip_Main_Window"), NULL);
+ if (wKB != NULL && ::IsWindowVisible(wKB))
+ {
+ ::PostMessage(wKB, WM_SYSCOMMAND, SC_CLOSE, 0);
+ }
+ }
+ break;
+ }
+ default: return;
}
}
#endif \ No newline at end of file