diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2000-04-07 16:15:34 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2000-04-07 16:15:34 +0000 |
commit | c546d3683d01c70fcd737d46bb280aae91bd9aa3 (patch) | |
tree | 0f4dd1234a32da1d69fe86357f2f72af0e81e863 /maccaml/graph.c | |
parent | d3c45d93f083cf7d30b54f682f0fcf6141d9ae58 (diff) |
MacOS
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3049 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'maccaml/graph.c')
-rw-r--r-- | maccaml/graph.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/maccaml/graph.c b/maccaml/graph.c index a23a7bf70..76318bd5b 100644 --- a/maccaml/graph.c +++ b/maccaml/graph.c @@ -1109,7 +1109,7 @@ value gr_wait_event (value veventlist) pt.h = Wx (oldx); pt.v = Wy (oldy); LocalToGlobal (&pt); - /* Restore the grafport now because GetAndProcessEvents may longjmp + /* Restore the grafport now because handle_signal may longjmp directly out of here. */ PopPort; @@ -1118,6 +1118,15 @@ value gr_wait_event (value veventlist) enter_blocking_section (); Caml_working (0); GetAndProcessEvents (askmotion ? waitMove : waitEvent, pt.h, pt.v); + if (quit_requested) exit (0); + if (intr_requested){ + intr_requested = 0; + Caml_working (1); + async_signal_mode = 1; + handle_signal (SIGINT); + async_signal_mode = 0; + Caml_working (0); + } Caml_working (1); leave_blocking_section (); if (askkey && (evt = GraphQPop ()) != NULL){ @@ -1156,6 +1165,7 @@ value gr_wait_event (value veventlist) goto gotevent; } } + sched_yield (); } gotevent: oldx = mouse_x; |