From owner-freebsd-ports Wed Nov 14 9:10: 7 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id DCEA637B417 for ; Wed, 14 Nov 2001 09:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAEHA1u21172; Wed, 14 Nov 2001 09:10:01 -0800 (PST) (envelope-from gnats) Date: Wed, 14 Nov 2001 09:10:01 -0800 (PST) Message-Id: <200111141710.fAEHA1u21172@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Andrew Milton Subject: Re: ports/31973: Turbo Vision doesn't handle mouse events correctly at 80x50 Reply-To: Andrew Milton Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ports/31973; it has been noted by GNATS. From: Andrew Milton 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