Commit Graph

109 Commits

Author SHA1 Message Date
ray
5136f041de Implement vd_drawrect and vd_setpixel for vt(9)'s VGA driver.
Sponsored by:	The FreeBSD Foundation
2014-02-07 12:39:58 +00:00
ray
8c8b9327e8 Add vt_set_border function to help to change border color.
Use vt_set_border to reset color after font changed (different font size may
change border sizes)

Sponsored by:	The FreeBSD Foundation
2014-02-06 15:16:38 +00:00
ray
d10ea36fa3 Add two new vt(9) driver methods: vd_drawrect and vd_setpixel.
Implement vd_drawrect and vd_setpixel for vt_fb driver.

Sponsored by:	The FreeBSD Foundation
2014-02-06 15:12:44 +00:00
jhibbits
773a89d478 Micro-optimize 8-bit blanking. This is the same as in ofw_syscons.
Reviewed by:	ray
MFC after:	1 week
2014-01-29 15:50:01 +00:00
ray
ff1baa3a0a Style(9) fix.
No functional changes.

Sponsored by:	The FreeBSD Foundation
2014-01-20 23:36:16 +00:00
ray
10e896d479 Update xboxfb driver to actual state.
NOTE: Not tested.

Sponsored by:	The FreeBSD Foundation
2014-01-15 12:35:28 +00:00
ray
c23c0c9f00 Restore VGA mode on vt switch. It fix VESA mode left by Xorg on exit.
Sponsored by:	The FreeBSD Foundation
2014-01-08 14:42:26 +00:00
rmh
cf5ac2bc67 Fix build of vt_xboxfb. 2014-01-08 14:36:35 +00:00
emaste
597158b535 Increase vt(9) max glyph data to 1MB for CJK fonts with many glyphs
Sponsored by:	The FreeBSD Foundation
2014-01-01 19:38:15 +00:00
ray
44f33e00e6 Fix AltGr, we should not only skip RAlt key release if enable_altgr is set, but
also process RAlt key press same way.

Sponsored by:	The FreeBSD Foundation
2013-12-26 14:25:37 +00:00
ray
33f5bc114d Use statndard (syscons) way to disable bell.
Testesd by:	markj

Sponsored by:	The FreeBSD Foundation
2013-12-25 19:07:14 +00:00
ray
4cd7151fa0 o Add virtual terminal mmap request handler.
o Forward termianl framebuffer ioctl to fbd.
o Forward terminal mmap request to fbd.
o Move inclusion of sys/conf.h to vt.h.

Sponsored by:	The FreeBSD Foundation
2013-12-23 18:09:10 +00:00
emaste
6ed839c35a Update whitespace to match mkkfont output
Sponsored by:	The FreeBSD Foundation
2013-12-23 17:49:12 +00:00
ray
4f65c6f4ae Update names from newcons to vt(9).
Sponsored by:	The FreeBSD Foundation
2013-12-22 15:33:15 +00:00
emaste
46ad59c614 Support double-width characters in vt(9)
Normal and bold fonts each have a glyph map for single or left half-
glyphs, and right half glyphs.  The flag TF_CJK_RIGHT in term_char_t
requests the right half-glyph.

Reviewed by:	ed@
Sponsored by:	The FreeBSD Foundation
2013-12-21 13:58:55 +00:00
ed
4d1897863f Extend libteken to support CJK fullwidth characters.
Introduce a new formatting bit (TF_CJK_RIGHT) that is set when putting a
cell that is the right part of a CJK fullwidth character. This will
allow drivers like vt(9) to support fullwidth characters properly.

emaste@ has a patch to extend vt(9)'s font handling to increase the
number of Unicode -> glyph maps from 2 ({normal,bold)} to 4
({normal,bold} x {left,right}). This will need to use this formatting
bit to determine whether to draw the left or right glyph.

Reviewed by:	emaste
2013-12-20 21:31:50 +00:00
ray
73daf98b85 Enable AltGr key by default.
Asked by:	many
Sponsored by:	The FreeBSD Foundation
2013-12-20 15:45:22 +00:00
ray
2a283aa894 Set mouse level per window, instead of global.
Sponsored by:	The FreeBSD Foundation
2013-12-20 15:37:57 +00:00
ray
1e2fa9f695 Enable mouse support for terminal clients (like dialog(1)).
Sponsored by:	The FreeBSD Foundation
2013-12-19 15:31:20 +00:00
ray
2d61a75a7f Skip processing of R.Alt as a second Alt key, if sysctl kern.vt.enable_altgr is
not zero.

Submitted by:	andreast
Sponsored by:	The FreeBSD Foundation
2013-12-18 00:14:58 +00:00
gnn
8141067e7f Fix a panic when booting with kernels that have FREEBBSD_COMPAT
4, 5, 6 or 43 by only thunking the data parameter for old ioctls
compatability ioctls instead of doing it for all of them.

Submitted by:	jhb@
2013-12-11 17:18:10 +00:00
kib
b1868df609 The opt_*.h headers must be included before any system header, except
sys/cdefs.h.  In particular, in case of COMPAT_43, param.h includes
sys/types.h, which includes sys/select.h, which includes
sys/_sigset.h.  The _sigset.h customizes the provided definions based
on COMPAT_43, eliminating osigset_t if symbol is not defined.  The
sys/proc.h is included after opt_compat.h and needs osigset_t.

Move opt_compat.h inclusion into the right place.

Sponsored by:	The FreeBSD Foundation
2013-12-10 22:33:02 +00:00
ray
ed0d5c9f43 Break build with error in case when both syscons and newcons are enabled.
Sponsored by:	The FreeBSD Foundation
2013-12-10 15:36:29 +00:00
ray
cf8df0ba08 o Compat options have to be defined before sys/ioccom.h included, so move
inclusion of right after sys/param.h.
o Only vt_core module use compat options, move it from common header to module.

Reported by:	Larry Rosenman ler at lerctr dot org

Sponsored by:	The FreeBSD Foundation
2013-12-09 15:28:34 +00:00
ray
97d6ba6169 Respect SC_NO_CUTPASTE option. It disable mouse cursor and cut/paste support
for vt(9). Note: /dev/sysmouse not affected.

Sponsored by:	The FreeBSD Foundation
2013-12-09 15:01:34 +00:00
ray
72549c538b o Build syscons(9)'s splash support if both sc and splash are enabled.
o Include opt_splash.h for vt(9) to know when splash device is enabled.
o Build logo_freebsd.c only if splash and vt are enabled.
o Include opt_compat.h to know when we have to respect compatibility.

Sponsored by:	The FreeBSD Foundation
2013-12-08 22:49:12 +00:00
ray
8866f80cfa Fix td_frame flags for i386.
Submitted by:	jilles

Sponsored by:	The FreeBSD Foundation
2013-12-06 23:12:21 +00:00
ray
40d47a9dd8 o Implement more standard ioctls.
o Translate old ioctls to new ones for compat with FREEBSD6/FREEBSD5/FREEBSD4.
o Fix style(9) on "return"s.
o Remove some extra debug.

Sponsored by:	The FreeBSD Foundation
2013-12-05 00:12:52 +00:00
nwhitehorn
31e401ca81 Fix build. 2013-11-30 22:49:26 +00:00
nwhitehorn
9cdeadcae2 Work around false positive errors from GCC. 2013-11-30 22:46:43 +00:00
ray
ac5298a605 Swap HOME/END for ScrollLocked mode. This fix confusion when End key move
history to begin point.

Sponsored by:	The FreeBSD Foundation
2013-11-24 00:15:57 +00:00
ray
03d23c19bd Remove atomic_(set|clear)_int from mouse control too. Same as in r258408.
Sponsored by:	The FreeBSD Foundation
2013-11-20 23:02:09 +00:00
ray
bdf8dee7bd Revert r258324. There mutexes should be used instead of atomics.
Pointed by:	kib, nwhitehorn

Sponsored by:	The FreeBSD Foundation
2013-11-20 22:54:09 +00:00
ray
06bcd76255 Notify terminal about process on current terminal start to use mouse on a
different "mouse level".

Sponsored by:	The FreeBSD Foundation
2013-11-18 22:55:50 +00:00
ray
c66056b21d Switch to use atomic ops for VT window flags, because some modifications can
come from another thread.

Sponsored by:	The FreeBSD Foundation
2013-11-18 22:39:34 +00:00
ray
50e1498142 Remove accidental line break.
Sponsored by:	The FreeBSD Foundation
2013-11-15 11:35:31 +00:00
ray
e43d36acfa Add VT_ALT_TO_ESC_HACK enabled by default. This will prepend ESC sequence before
any chars when any of ALT keys is down.
! Not sure if it right way, but now it is possible to use Alt keys in vim.

Sponsored by:	The FreeBSD Foundation
2013-11-15 11:33:36 +00:00
ray
3a1474f1ca Done cut/paste "word" selection mode support.
It still selects everything which is not space around.

Sponsored by:	The FreeBSD Foundation

Sponsored by:	The FreeBSD Foundation
2013-11-14 15:44:22 +00:00
ray
2393e1d45d wrap long lines.
Sponsored by:	The FreeBSD Foundation
Sponsored by:	The FreeBSD Foundation
2013-11-14 15:14:27 +00:00
ray
ba5a321719 Save last mouse event and check if the button1-up event happen w/o movement,
then ignore it. Otherwise such events broke double/triple click sequence.

Sponsored by:	The FreeBSD Foundation
2013-11-14 13:25:47 +00:00
ray
2e0700ebf4 Correct copy/paste mistake.
Sponsored by:   The FreeBSD Foundation
2013-11-14 00:02:18 +00:00
ray
bf95a4a20c Simplify a bit vtbuf_set_mark.
Sponsored by:   The FreeBSD Foundation
2013-11-14 00:00:55 +00:00
ray
ca21cb44d3 Panic/DDB check should only affect mouse, screen redraw allowed. :) 2013-11-13 23:58:45 +00:00
ray
86dec2aac1 Do not add <CR><LF> for last (single) line of paste buffer.
Sponsored by:	The FreeBSD Foundation
2013-11-13 14:35:00 +00:00
ray
a7cc0f5b3f Move vt_mouse_event out of sysmouse lock.
Sponsored by:	The FreeBSD Foundation
2013-11-13 12:34:24 +00:00
ray
d90e7c4086 o Simplify POS_INDEX macro calculation.
o New macro POS_COPY to copy between term_pos_t.
o Add vtbuf_wth/vtbuf_htw helpers, to translate between screen coordinates and
	circular history buffer location.
o Update vtbuf_iscursor to mark region selected by mouse.
o New helper vtbuf_flush_mark, to update regions where copy/paste mark changed.
o New method vtbuf_get_marked_len to get storage size for paste buffer.
o vtbuf_extract_marked fill (caller allocated buffer) with selected region data.
o Simplify mouse handler for copy/paste, and use vtbuf_flush_mark to update.
o New method vtbuf_scroll_mode, to help indicate Scroll mode by hiding cursor.
o Update header with new vtbuf methods.
o Add new vt_driver method vd_markedwin, to hold last window with selection.
o Enable paste support in core module.

Sponsored by:	The FreeBSD Foundation
Pointed by:	Claude Buisson <clbuisson@orange.fr> (Scroll mode indication)
2013-11-13 12:32:41 +00:00
ray
6c7023e93f Add kern.vt.suspendswitch tunable. This will allow to disable default behavior
(switch to VT0 on suspend, switch back on resume).
If 0 - disabled, other values - enabled.

Requested by:	jhb
Sponsored by:   The FreeBSD Foundation
2013-11-11 22:07:56 +00:00
ray
2edf4bd36a Update vd_bitbltchr_t type to handle operation mask (to not touch pixels which
is not defined in mask) and bpl (bytes per source line).
Only vt_fb driver handle handle bpl yet.
Add protector for case when blitting image can be drawn partially out of screen,
like mouse cursor.

Mouse cursor and its movements works fine, copy/paste not yet.

Sponsored by:	The FreeBSD Foundation
2013-11-11 13:25:49 +00:00
ray
792e20c4de Add forgotten definition of vt_default_mouse_pointer.
Sponsored by:	The FreeBSD Foundation
2013-11-11 13:06:31 +00:00
ray
d5a2f3c539 Define vt_mouse_event method.
Sponsored by:	The FreeBSD Foundation
2013-11-11 12:44:54 +00:00