Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_SystemWin32.cpp
| Context not available. | |||||
| event = processCursorEvent(GHOST_kEventCursorMove, window); | event = processCursorEvent(GHOST_kEventCursorMove, window); | ||||
| break; | break; | ||||
| case WM_MOUSEWHEEL: | case WM_MOUSEWHEEL: | ||||
| { | |||||
| /* redirect event outside the window to window under cursor */ | |||||
| RECT rect; | |||||
| if (!GetWindowRect(hwnd, &rect)) break; | |||||
| int x = GET_X_LPARAM(lParam); | |||||
| int y = GET_Y_LPARAM(lParam); | |||||
| POINT point = {x, y}; | |||||
| if (x < rect.left || x >= rect.right || y < rect.top || y >= rect.bottom) { | |||||
| HWND win = WindowFromPoint(point); | |||||
| GHOST_WindowManager *manager = ((GHOST_SystemWin32*)getSystem())->getWindowManager(); | |||||
| bool is_blenderwindow = manager->getWindowAssociatedWithOSWindow((void*)win) != NULL; | |||||
| HWND active_win = ((GHOST_WindowWin32*)(manager->getActiveWindow()))->getHWND(); | |||||
| if (is_blenderwindow && hwnd == active_win && hwnd != win) { | |||||
| SendMessage(win, msg, wParam, lParam); | |||||
| eventHandled = true; | |||||
| break; | |||||
| } | |||||
| } | |||||
| } | |||||
| /* The WM_MOUSEWHEEL message is sent to the focus window | /* The WM_MOUSEWHEEL message is sent to the focus window | ||||
| * when the mouse wheel is rotated. The DefWindowProc | * when the mouse wheel is rotated. The DefWindowProc | ||||
| * function propagates the message to the window's parent. | * function propagates the message to the window's parent. | ||||
| Context not available. | |||||