From e55bd8e619aad30c119e8e17894337021fb16af8 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 6 Jan 2026 13:00:30 +0300 Subject: PDCurses: fixed modifiers (CTRL, ALT, SHIFT) and mouse support on XCurses * While xcurses-config does define PDC_WIDE, it does not define PDC_NCMOUSE, which we currently rely on so that NCURSES_MOUSE_VERSION is set correctly. Therefore we check for it just like when using --with-interface=pdcurses. * The modifiers were broken on all variants of PDCurses. This was a regression from v2.4.0. --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 5ac7aad..460862c 100644 --- a/configure.ac +++ b/configure.ac @@ -334,6 +334,8 @@ case $INTERFACE in xcurses) AC_CHECK_PROG(XCURSES_CONFIG, xcurses-config, xcurses-config) + # NOTE: `xcurses-config --cflags` is expected to set + # -DPDC_WIDE and -DPDC_FORCE_UTF8 (if these features are enabled). if [[ "x$CURSES_CFLAGS" = "x" -a "x$XCURSES_CONFIG" != "x" ]]; then CURSES_CFLAGS=`$XCURSES_CONFIG --cflags` fi @@ -353,6 +355,10 @@ case $INTERFACE in # It is crucial to define XCURSES before including curses.h. AC_DEFINE(XCURSES, 1, [Enable PDCurses/XCurses extensions]) + AC_CHECK_FUNC([has_mouse], [ + AC_DEFINE(PDC_NCMOUSE, 1, [PDCurses built with ncurses mouse API]) + ]) + AC_DEFINE(PDCURSES_GUI, 1, [PDCurses with GUI window]) ;; -- cgit v1.2.3