You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6281 Reporter: kygron Assigned to:@damiendoligez Status: closed (set by @damiendoligez on 2015-05-12T01:29:16Z) Resolution: fixed Priority: normal Severity: minor OS: Windows Version: 4.01.0 Target version: 4.02.2+dev / +rc1 Fixed in version: 4.02.2+dev / +rc1 Category: otherlibs Tags: patch Monitored by:@Chris00
Bug description
The Graphics library is configured to ignore a double click event from Windows. For example, clicking 3 times in rapid succession will produce 2 mouse down events, ignoring the one within the double click threshold of the system.
Remove CS_DBLCLKS from the above style flags and the library will work as intended.
OR
win32graph/events.c caml_gr_handle_event:
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_MBUTTONDOWN:
->case WM_LBUTTONDBLCLK:
->case WM_RBUTTONDBLCLK:
->case WM_MBUTTONDBLDLK:
last_button = 1;
add the -> cases to catch the double click events
Steps to reproduce
watch the click count skip doubles in this code fragment:
open Graphics;;
let click_count = ref 0;;
open_graph "";;
while true do
ignore(wait_next_event [Button_down]);
click_count := succ !click_count;
auto_synchronize false;
clear_graph();
moveto 0 0;
draw_string ("Clicks: "^(string_of_int !click_count));
auto_synchronize true;
done;;
The text was updated successfully, but these errors were encountered:
Original bug ID: 6281
Reporter: kygron
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2015-05-12T01:29:16Z)
Resolution: fixed
Priority: normal
Severity: minor
OS: Windows
Version: 4.01.0
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.02.2+dev / +rc1
Category: otherlibs
Tags: patch
Monitored by: @Chris00
Bug description
The Graphics library is configured to ignore a double click event from Windows. For example, clicking 3 times in rapid succession will produce 2 mouse down events, ignoring the one within the double click threshold of the system.
To fix:
win32graph/open.c DoRegisterClass:
wc.style = CS_HREDRAW|CS_VREDRAW |CS_DBLCLKS|CS_OWNDC ;
Remove CS_DBLCLKS from the above style flags and the library will work as intended.
OR
win32graph/events.c caml_gr_handle_event:
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_MBUTTONDOWN:
->case WM_LBUTTONDBLCLK:
->case WM_RBUTTONDBLCLK:
->case WM_MBUTTONDBLDLK:
last_button = 1;
add the -> cases to catch the double click events
Steps to reproduce
watch the click count skip doubles in this code fragment:
open Graphics;;
let click_count = ref 0;;
open_graph "";;
while true do
ignore(wait_next_event [Button_down]);
click_count := succ !click_count;
auto_synchronize false;
clear_graph();
moveto 0 0;
draw_string ("Clicks: "^(string_of_int !click_count));
auto_synchronize true;
done;;
The text was updated successfully, but these errors were encountered: