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. --- src/interface-curses/interface.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/interface-curses') diff --git a/src/interface-curses/interface.c b/src/interface-curses/interface.c index bc48b5e..9ace2ee 100644 --- a/src/interface-curses/interface.c +++ b/src/interface-curses/interface.c @@ -278,8 +278,8 @@ teco_color_attr(gshort fg, gshort bg) * Basic support for monochrome terminals: * Every background, that is not black is assumed to be a * dark-on-bright area, rendered in reverse. - * This will at least work with the terminal.tes - * color scheme. + * This will at least work with the terminal.tes and contrast.tes + * color schemes. */ return bg != COLOR_BLACK ? A_REVERSE : 0; } @@ -2031,7 +2031,8 @@ teco_interface_blocking_getch(void) gboolean new_mousekey = (teco_ed & TECO_ED_MOUSEKEY) != 0; if (new_mousekey != old_mousekey) { old_mousekey = new_mousekey; - mmask_t mmask = BUTTON_EVENT(PRESSED) | BUTTON_EVENT(RELEASED); + mmask_t mmask = BUTTON_EVENT(PRESSED) | BUTTON_EVENT(RELEASED) | + BUTTON_SHIFT | BUTTON_CTRL | BUTTON_ALT; #ifdef __PDCURSES__ /* * On PDCurses it's crucial NOT to mask for BUTTONX_CLICKED. -- cgit v1.2.3