Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/lib/platform/MSWindowsDesks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,9 @@ void MSWindowsDesks::deskThread(void *vdesk)
break;

case DESKFLOW_MSG_FAKE_WHEEL:
// XXX -- add support for x-axis scrolling
if (msg.wParam != 0) {
send_mouse_input(MOUSEEVENTF_HWHEEL, 0, 0, (DWORD)msg.wParam);
}
if (msg.lParam != 0) {
send_mouse_input(MOUSEEVENTF_WHEEL, 0, 0, (DWORD)msg.lParam);
}
Expand Down
7 changes: 7 additions & 0 deletions src/lib/platform/MSWindowsHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,13 @@ static bool mouseHookHandler(WPARAM wParam, SInt32 x, SInt32 y, SInt32 data)
return (g_mode == kHOOK_RELAY_EVENTS);

case WM_MOUSEWHEEL:
if (g_mode == kHOOK_RELAY_EVENTS) {
// relay event
PostThreadMessage(g_threadID, DESKFLOW_MSG_MOUSE_WHEEL, 0, data);
}
return (g_mode == kHOOK_RELAY_EVENTS);

case WM_MOUSEHWHEEL:
if (g_mode == kHOOK_RELAY_EVENTS) {
// relay event
PostThreadMessage(g_threadID, DESKFLOW_MSG_MOUSE_WHEEL, data, 0);
Expand Down
3 changes: 1 addition & 2 deletions src/lib/platform/MSWindowsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -985,8 +985,7 @@ bool MSWindowsScreen::onPreDispatchPrimary(HWND, UINT message, WPARAM wParam, LP
return onMouseMove(static_cast<SInt32>(wParam), static_cast<SInt32>(lParam));

case DESKFLOW_MSG_MOUSE_WHEEL:
// XXX -- support x-axis scrolling
return onMouseWheel(0, static_cast<SInt32>(wParam));
return onMouseWheel(static_cast<SInt32>(wParam), static_cast<SInt32>(lParam));

case DESKFLOW_MSG_PRE_WARP: {
// save position to compute delta of next motion
Expand Down