Skip to content

Commit

Permalink
Merge pull request #459 from OpenSmalltalk/win_mouse_wheel_alignment
Browse files Browse the repository at this point in the history
Align windows behavior with other platforms in response to mouse wheel events
  • Loading branch information
nicolas-cellier-aka-nice committed Dec 25, 2019
2 parents 25c8a59 + b7e5fec commit a4a08f9
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions platforms/win32/vm/sqWin32Window.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ LRESULT CALLBACK MainWndProcW(HWND hwnd,
/* RvL 1999-04-19 00:23
MOUSE WHEELING START */
if( WM_MOUSEWHEEL == message || g_WM_MOUSEWHEEL == message ) {
/* Record mouse wheel msgs as CTRL-Up/Down.
/* Record mouse wheel msgs as Up/Down arrow keypress + meta bits.
* N.B. On iOS & X11 we also handle horizonal mouse wheel events.
* Should the same happen here?
*/
Expand All @@ -313,16 +313,10 @@ LRESULT CALLBACK MainWndProcW(HWND hwnd,
evt->timeStamp = messageTouse->time;
evt->charCode = (zDelta > 0) ? 30 : 31;
evt->pressCode = EventKeyChar;
/* N.B. on iOS & X11 all meta bits are set to distinguish mouse wheel
* events from real arrow key events. Should the same happen here?
/* Set every meta bit to distinguish the fake event from a real arrow keypress
*/
evt->modifiers = CtrlKeyBit;
/* It would be good if this were set in the SqueakVM also, no? */
#ifdef PharoVM
evt->utf32Code = evt->charCode;
#else
evt->utf32Code = 0;
#endif
evt->modifiers = CtrlKeyBit|OptionKeyBit|CommandKeyBit|ShiftKeyBit;
evt->utf32Code = evt->charCode;
evt->reserved1 = 0;
} else {
buttonState = 64;
Expand Down

0 comments on commit a4a08f9

Please sign in to comment.