head 1.1; access; symbols pkgsrc-2026Q2:1.1.0.38 pkgsrc-2026Q2-base:1.1 pkgsrc-2026Q1:1.1.0.36 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.34 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.32 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.30 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.28 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.26 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.24 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.22 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.20 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.18 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.16 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.14 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.12 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.10 pkgsrc-2022Q4-base:1.1 pkgsrc-2022Q3:1.1.0.8 pkgsrc-2022Q3-base:1.1 pkgsrc-2022Q2:1.1.0.6 pkgsrc-2022Q2-base:1.1 pkgsrc-2022Q1:1.1.0.4 pkgsrc-2022Q1-base:1.1 pkgsrc-2021Q4:1.1.0.2 pkgsrc-2021Q4-base:1.1; locks; strict; comment @# @; 1.1 date 2021.12.26.05.09.45; author dholland; state Exp; branches; next ; commitid mWPVZitN2nSho7mD; desc @@ 1.1 log @Fix undefined PLT symbol "caml_process_pending_signals" in ocaml-graphics. Patch from upstream. Bump PKGREVISION (to 2) as it built but didn't run. XXX: this package needs to be updated after the freeze @ text @$NetBSD$ https://github.com/xavierleroy/graphics/commit/60b5f91ebd7dd86f4c801f801e2e28bde1fd0cc3.diff Replace call to caml_process_pending_signals by explicit processing of events caml_process_pending_signals is a function from OCaml's runtime system that disappeared in version 4.10. The reason this function was called in caml_gr_wait_event_poll was to process pending X events and merge them in our event queue before the results of the poll are determined. It should be just as good to explicitly purge pending X events instead. See https://github.com/ocaml/graphics/issues/14. diff --git a/src/unix/events.c b/src/unix/events.c index b858b03..93f3fef 100644 --- src/unix/events.c +++ src/unix/events.c @@@@ -157,13 +157,18 @@@@ static value caml_gr_wait_allocate_result(int mouse_x, int mouse_y, int button, static value caml_gr_wait_event_poll(void) { + XEvent grevent; int mouse_x, mouse_y, button, key, keypressed; Window rootwin, childwin; int root_x, root_y, win_x, win_y; unsigned int modifiers; unsigned int i; - caml_process_pending_signals (); + /* Process pending X events before polling */ + while (XCheckMaskEvent(caml_gr_display, -1 /*all events*/, &grevent)) { + caml_gr_handle_event(&grevent); + } + /* Poll the mouse state */ if (XQueryPointer(caml_gr_display, caml_gr_window.win, &rootwin, &childwin, &root_x, &root_y, &win_x, &win_y, @