Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowWin32.cpp')
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index a89b2608bb4..1ba51376ff9 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -136,7 +136,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(
GHOST_TSuccess msEnabled,
int msPixelFormat)
:
- GHOST_Window(title, left, top, width, height, state, GHOST_kDrawingContextTypeNone,
+ GHOST_Window(width, height, state, GHOST_kDrawingContextTypeNone,
stereoVisual,numOfAASamples),
m_system(system),
m_hDC(0),
@@ -307,6 +307,15 @@ GHOST_WindowWin32::GHOST_WindowWin32(
}
}
+ if (parentwindowhwnd != 0) {
+ RAWINPUTDEVICE device = {0};
+ device.usUsagePage = 0x01; /* usUsagePage & usUsage for keyboard*/
+ device.usUsage = 0x06; /* http://msdn.microsoft.com/en-us/windows/hardware/gg487473.aspx */
+ device.dwFlags |= RIDEV_INPUTSINK; // makes WM_INPUT is visible for ghost when has parent window
+ device.hwndTarget = m_hWnd;
+ RegisterRawInputDevices(&device, 1, sizeof(device));
+ }
+
m_wintab = ::LoadLibrary("Wintab32.dll");
if (m_wintab) {
GHOST_WIN32_WTInfo fpWTInfo = ( GHOST_WIN32_WTInfo ) ::GetProcAddress( m_wintab, "WTInfoA" );