Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_SystemWin32.cpp
| Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | |||||
| #define VK_MEDIA_PLAY_PAUSE 0xB3 | #define VK_MEDIA_PLAY_PAUSE 0xB3 | ||||
| #endif // VK_MEDIA_PLAY_PAUSE | #endif // VK_MEDIA_PLAY_PAUSE | ||||
| // Window message newer than Windows 7 | // Window message newer than Windows 7 | ||||
| #ifndef WM_DPICHANGED | #ifndef WM_DPICHANGED | ||||
| #define WM_DPICHANGED 0x02E0 | #define WM_DPICHANGED 0x02E0 | ||||
| #endif // WM_DPICHANGED | #endif // WM_DPICHANGED | ||||
| #ifndef WM_POINTERUPDATE | |||||
| #define WM_POINTERUPDATE 0x0245 | |||||
| #endif // WM_POINTERUPDATE | |||||
| /* Workaround for some laptop touchpads, some of which seems to | /* Workaround for some laptop touchpads, some of which seems to | ||||
| * have driver issues which makes it so window function receives | * have driver issues which makes it so window function receives | ||||
| * the message, but PeekMessage doesn't pick those messages for | * the message, but PeekMessage doesn't pick those messages for | ||||
| * some reason. | * some reason. | ||||
| * | * | ||||
| * We send a dummy WM_USER message to force PeekMessage to receive | * We send a dummy WM_USER message to force PeekMessage to receive | ||||
| * something, making it so blender's window manager sees the new | * something, making it so blender's window manager sees the new | ||||
| * messages coming in. | * messages coming in. | ||||
| ▲ Show 20 Lines • Show All 1,095 Lines • ▼ Show 20 Lines | #endif /* WITH_INPUT_IME */ | ||||
| //////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////// | ||||
| case WT_PACKET: | case WT_PACKET: | ||||
| window->processWin32TabletEvent(wParam, lParam); | window->processWin32TabletEvent(wParam, lParam); | ||||
| break; | break; | ||||
| case WT_CSRCHANGE: | case WT_CSRCHANGE: | ||||
| case WT_PROXIMITY: | case WT_PROXIMITY: | ||||
| window->processWin32TabletInitEvent(); | window->processWin32TabletInitEvent(); | ||||
| break; | break; | ||||
| case WM_POINTERUPDATE: | |||||
| window->processWin32PointerEvent(wParam); | |||||
| break; | |||||
| //////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////// | ||||
| // Mouse events, processed | // Mouse events, processed | ||||
| //////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////// | ||||
| case WM_LBUTTONDOWN: | case WM_LBUTTONDOWN: | ||||
| window->registerMouseClickEvent(0); | window->registerMouseClickEvent(0); | ||||
| event = processButtonEvent(GHOST_kEventButtonDown, window, GHOST_kButtonMaskLeft); | event = processButtonEvent(GHOST_kEventButtonDown, window, GHOST_kButtonMaskLeft); | ||||
| break; | break; | ||||
| case WM_MBUTTONDOWN: | case WM_MBUTTONDOWN: | ||||
| ▲ Show 20 Lines • Show All 201 Lines • ▼ Show 20 Lines | #endif | ||||
| break; | break; | ||||
| case WM_DPICHANGED: | case WM_DPICHANGED: | ||||
| /* The WM_DPICHANGED message is sent when the effective dots per inch (dpi) for a window has changed. | /* The WM_DPICHANGED message is sent when the effective dots per inch (dpi) for a window has changed. | ||||
| * The DPI is the scale factor for a window. There are multiple events that can cause the DPI to | * The DPI is the scale factor for a window. There are multiple events that can cause the DPI to | ||||
| * change such as when the window is moved to a monitor with a different DPI. | * change such as when the window is moved to a monitor with a different DPI. | ||||
| */ | */ | ||||
| { | { | ||||
| WORD newYAxisDPI = HIWORD(wParam); | |||||
| WORD newXAxisDPI = LOWORD(wParam); | |||||
| // The suggested new size and position of the window. | // The suggested new size and position of the window. | ||||
| RECT* const suggestedWindowRect = (RECT*)lParam; | RECT* const suggestedWindowRect = (RECT*)lParam; | ||||
| // Push DPI change event first | // Push DPI change event first | ||||
| system->pushEvent(processWindowEvent(GHOST_kEventWindowDPIHintChanged, window)); | system->pushEvent(processWindowEvent(GHOST_kEventWindowDPIHintChanged, window)); | ||||
| system->dispatchEvents(); | system->dispatchEvents(); | ||||
| eventHandled = true; | eventHandled = true; | ||||
| ▲ Show 20 Lines • Show All 297 Lines • Show Last 20 Lines | |||||