From e2eb0417857dade607a3f068608c337297832b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Fri, 22 Aug 2014 13:48:33 +0000 Subject: [PATCH] vt(4): Mark new mouse position as dirty only when it's actually displayed MFC after: 1 week --- sys/dev/vt/vt_core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index cbaed84fe025..1784a180c421 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -893,9 +893,6 @@ vt_flush(struct vt_device *vd) vtbuf_mouse_cursor_position(&vw->vw_buf, vd->vd_moldx / vf->vf_width, vd->vd_moldy / vf->vf_height); - vtbuf_mouse_cursor_position(&vw->vw_buf, - vd->vd_mx / vf->vf_width, - vd->vd_my / vf->vf_height); /* * Save point of last mouse cursor to erase it @@ -908,6 +905,11 @@ vt_flush(struct vt_device *vd) if (!kdb_active && panicstr == NULL) { /* Mouse enabled, and DDB isn't active. */ cursor = &vt_default_mouse_pointer; + + /* Mark new mouse position as dirty. */ + vtbuf_mouse_cursor_position(&vw->vw_buf, + vd->vd_mx / vf->vf_width, + vd->vd_my / vf->vf_height); } } #endif