Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphics window does not acknowledge second click (double click) (fix included) #6281

vicuna opened this issue Dec 28, 2013 · 2 comments


None yet
2 participants
Copy link

commented Dec 28, 2013

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: = CS_HREDRAW|CS_VREDRAW |CS_DBLCLKS|CS_OWNDC ;

Remove CS_DBLCLKS from the above style flags and the library will work as intended.


win32graph/events.c caml_gr_handle_event:

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;
moveto 0 0;
draw_string ("Clicks: "^(string_of_int !click_count));
auto_synchronize true;


This comment has been minimized.

Copy link

commented Jul 16, 2014

Comment author: @damiendoligez

The first solution looks cleaner to me.


This comment has been minimized.

Copy link

commented May 12, 2015

Comment author: @damiendoligez

Fixed in 4.02 branch (rev 16111).

@vicuna vicuna closed this May 12, 2015

@vicuna vicuna added the otherlibs label Mar 14, 2019

@vicuna vicuna added this to the 4.02.2 milestone Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.