diff options
author | kato <kato@FreeBSD.org> | 1997-08-10 10:52:17 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1997-08-10 10:52:17 +0000 |
commit | 009722c825fa0e0c9a03a67f1498d96dcc46c934 (patch) | |
tree | 70a3d8302dd635f3e3fb5cf626bd704e71084f79 /sys | |
parent | 3cd087ca46a24ad7de55f9bf1b06f475279c4c90 (diff) | |
download | FreeBSD-src-009722c825fa0e0c9a03a67f1498d96dcc46c934.zip FreeBSD-src-009722c825fa0e0c9a03a67f1498d96dcc46c934.tar.gz |
Synchronize with sys/i386/isa/syscons.c revision 1.230.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pc98/pc98/syscons.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c index 1cc32a3..87f2150 100644 --- a/sys/pc98/pc98/syscons.c +++ b/sys/pc98/pc98/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.52 1997/08/09 01:54:51 kato Exp $ + * $Id: syscons.c,v 1.53 1997/08/09 06:41:06 kato Exp $ */ #include "sc.h" @@ -1211,8 +1211,6 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) for (i=0; i<5; i++) (*linesw[(MOUSE_TTY)->t_line].l_rint)(buf[i],MOUSE_TTY); } - cur_console->mouse_xpos += mouse->u.data.x; - cur_console->mouse_ypos += mouse->u.data.y; if (cur_console->mouse_signal) { cur_console->mouse_buttons = mouse->u.data.buttons; /* has controlling process died? */ @@ -1240,8 +1238,11 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) } } } - if (mouse->u.data.x != 0 || mouse->u.data.y != 0) + if (mouse->u.data.x != 0 || mouse->u.data.y != 0) { + cur_console->mouse_xpos += mouse->u.data.x; + cur_console->mouse_ypos += mouse->u.data.y; set_mouse_pos(cur_console); + } break; default: @@ -4885,25 +4886,22 @@ static void set_mouse_pos(scr_stat *scp) { static int last_xpos = -1, last_ypos = -1; - /* - * the margins imposed here are not ideal, we loose - * a couble of pixels on the borders.. - */ + if (scp->mouse_xpos < 0) scp->mouse_xpos = 0; if (scp->mouse_ypos < 0) scp->mouse_ypos = 0; if (scp->status & UNKNOWN_MODE) { - if (scp->mouse_xpos > scp->xpixel) + if (scp->mouse_xpos > scp->xpixel-1) scp->mouse_xpos = scp->xpixel-1; - if (scp->mouse_ypos > scp->ypixel) + if (scp->mouse_ypos > scp->ypixel-1) scp->mouse_ypos = scp->ypixel-1; return; } - if (scp->mouse_xpos > (scp->xsize*8)-2) - scp->mouse_xpos = (scp->xsize*8)-2; - if (scp->mouse_ypos > (scp->ysize*scp->font_size)-2) - scp->mouse_ypos = (scp->ysize*scp->font_size)-2; + if (scp->mouse_xpos > (scp->xsize*8)-1) + scp->mouse_xpos = (scp->xsize*8)-1; + if (scp->mouse_ypos > (scp->ysize*scp->font_size)-1) + scp->mouse_ypos = (scp->ysize*scp->font_size)-1; if (scp->mouse_xpos != last_xpos || scp->mouse_ypos != last_ypos) { scp->status |= MOUSE_MOVED; |