aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/vt/font/vt_mouse_cursor.c6
-rw-r--r--sys/dev/vt/vt.h18
-rw-r--r--sys/dev/vt/vt_core.c16
3 files changed, 21 insertions, 19 deletions
diff --git a/sys/dev/vt/font/vt_mouse_cursor.c b/sys/dev/vt/font/vt_mouse_cursor.c
index 0219c7c91db5..4f1299164178 100644
--- a/sys/dev/vt/font/vt_mouse_cursor.c
+++ b/sys/dev/vt/font/vt_mouse_cursor.c
@@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$");
#include <dev/vt/vt.h>
#ifndef SC_NO_CUTPASTE
-struct mouse_cursor vt_default_mouse_pointer = {
+struct vt_mouse_cursor vt_default_mouse_pointer = {
.map = {
0x00, /* "__ " */
0x40, /* "_*_ " */
@@ -64,7 +64,7 @@ struct mouse_cursor vt_default_mouse_pointer = {
0x0f, /* " ____" */
0x0f, /* " ____" */
},
- .w = 8,
- .h = 13,
+ .width = 8,
+ .height = 13,
};
#endif
diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h
index c6d31db21b31..c668c87f40f9 100644
--- a/sys/dev/vt/vt.h
+++ b/sys/dev/vt/vt.h
@@ -284,6 +284,15 @@ struct vt_window {
* (VDF_TEXTMODE).
*/
+#ifndef SC_NO_CUTPASTE
+struct vt_mouse_cursor {
+ uint8_t map[64 * 64 / 8];
+ uint8_t mask[64 * 64 / 8];
+ uint8_t width;
+ uint8_t height;
+};
+#endif
+
typedef int vd_init_t(struct vt_device *vd);
typedef int vd_probe_t(struct vt_device *vd);
typedef void vd_postswitch_t(struct vt_device *vd);
@@ -377,15 +386,6 @@ struct vt_font {
unsigned int vf_refcount;
};
-#ifndef SC_NO_CUTPASTE
-struct mouse_cursor {
- uint8_t map[64 * 64 / 8];
- uint8_t mask[64 * 64 / 8];
- uint8_t w;
- uint8_t h;
-};
-#endif
-
const uint8_t *vtfont_lookup(const struct vt_font *vf, term_char_t c);
struct vt_font *vtfont_ref(struct vt_font *vf);
void vtfont_unref(struct vt_font *vf);
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
index 05304ca567ba..087c5ce1857b 100644
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -134,7 +134,7 @@ extern unsigned char vt_logo_image[];
/* Font. */
extern struct vt_font vt_font_default;
#ifndef SC_NO_CUTPASTE
-extern struct mouse_cursor vt_default_mouse_pointer;
+extern struct vt_mouse_cursor vt_default_mouse_pointer;
#endif
static int signal_vt_rel(struct vt_window *);
@@ -853,7 +853,7 @@ vt_flush(struct vt_device *vd)
term_pos_t size;
term_char_t *r;
#ifndef SC_NO_CUTPASTE
- struct mouse_cursor *cursor;
+ struct vt_mouse_cursor *cursor;
int bpl, h, w;
#endif
@@ -940,13 +940,15 @@ vt_flush(struct vt_device *vd)
#ifndef SC_NO_CUTPASTE
if (cursor != NULL) {
- bpl = (cursor->w + 7) >> 3; /* Bytes per source line. */
- w = cursor->w;
- h = cursor->h;
+ bpl = (cursor->width + 7) >> 3; /* Bytes per source line. */
+ w = cursor->width;
+ h = cursor->height;
- if ((vd->vd_mx + cursor->w) > (size.tp_col * vf->vf_width))
+ if ((vd->vd_mx + cursor->width) >
+ (size.tp_col * vf->vf_width))
w = (size.tp_col * vf->vf_width) - vd->vd_mx - 1;
- if ((vd->vd_my + cursor->h) > (size.tp_row * vf->vf_height))
+ if ((vd->vd_my + cursor->height) >
+ (size.tp_row * vf->vf_height))
h = (size.tp_row * vf->vf_height) - vd->vd_my - 1;
vd->vd_driver->vd_bitbltchr(vd, cursor->map, cursor->mask, bpl,