Mercurial > dwindows
diff win/dw.c @ 2618:156ad91481eb
WARNING: Standardize button press and release button parameter values.
This may break existing code using 3rd mouse button press/release events.
The motion callback and OS/2 had been passing the 3rd mouse button as value 4.
Other platforms were passing it as value 3. Since button/press and release
events only have a single button values 1,2,3 were unique... but OS/2 was
passing the mask value instead, making these not work cross platform.
I decided to make the button press/release and motion events all function the
same. Passing the mask values instead of button numbers. This change will
only affect button 3 on button press or release events on Windows, Mac and GTK.
OS/2 already functioned this way, iOS and Android do not support button 3.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 23 Jul 2021 20:26:56 +0000 |
parents | d17e3fb76bde |
children | 2e804b4db81e |
line wrap: on
line diff
--- a/win/dw.c Fri Jul 23 19:42:06 2021 +0000 +++ b/win/dw.c Fri Jul 23 20:26:56 2021 +0000 @@ -2320,13 +2320,13 @@ switch(origmsg) { case WM_LBUTTONDOWN: - button = 1; + button = DW_BUTTON1_MASK; break; case WM_RBUTTONDOWN: - button = 2; + button = DW_BUTTON2_MASK; break; case WM_MBUTTONDOWN: - button = 3; + button = DW_BUTTON3_MASK; break; } if(taskbar) @@ -2355,13 +2355,13 @@ switch(origmsg) { case WM_LBUTTONUP: - button = 1; + button = DW_BUTTON1_MASK; break; case WM_RBUTTONUP: - button = 2; + button = DW_BUTTON2_MASK; break; case WM_MBUTTONUP: - button = 3; + button = DW_BUTTON3_MASK; break; } if(taskbar)