Date: Wed, 14 Nov 2001 09:10:01 -0800 (PST) From: Andrew Milton <akm@theinternet.com.au> To: freebsd-ports@FreeBSD.org Subject: Re: ports/31973: Turbo Vision doesn't handle mouse events correctly at 80x50 Message-ID: <200111141710.fAEHA1u21172@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/31973; it has been noted by GNATS. From: Andrew Milton <akm@theinternet.com.au> To: freebsd-gnats-submit@FreeBSD.org, akm@theinternet.com.au Cc: Subject: Re: ports/31973: Turbo Vision doesn't handle mouse events correctly at 80x50 Date: Thu, 15 Nov 2001 03:03:57 +1000 This seems to work for me. --- work/tvision-0.7/lib/system.cc.orig Mon Sep 28 22:16:39 1998 +++ work/tvision-0.7/lib/system.cc Thu Nov 15 03:00:19 2001 @@ -857,13 +857,20 @@ { TEvent event; mouse_info_t mi; + int heightDivider=16; mi.operation = MOUSE_GETINFO; ioctl(STDOUT_FILENO, CONS_MOUSECTL, &mi); + + if(TScreen::screenHeight > 25) + { + heightDivider=8; + } + event.mouse.controlKeyState = kbReadShiftState(); event.mouse.where.x = range(mi.u.data.x / 8, 0, TScreen::screenWidth - 1); - event.mouse.where.y = range(mi.u.data.y / 16, 0, + event.mouse.where.y = range(mi.u.data.y / heightDivider, 0, TScreen::screenHeight - 1); /* convert button bits to TV standard */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111141710.fAEHA1u21172>