Commit Graph

123 Commits

Author SHA1 Message Date
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
ray
8dbd4d4ade Wrap long lines.
Sponsored by:	The FreeBSD Foundation
2013-11-11 12:38:28 +00:00
ray
b2222c2dc5 Enable/disable mouse cursor on MOUSE_SHOW/MOUSE_HIDE.
Sponsored by:	The FreeBSD Foundation
2013-11-11 12:36:18 +00:00
ray
8a8f79117d o Update vt_flush to care about mouse pointer.
o Sort variable declarations.
o Disable mouse support for DDB.
o Expose region to update on old mouse position.
o Draw mouse cursor on current position.

There is some extra bits for calculation of size to copy bitmap to screen.
It is not supported by drivers, but will be changed in following commits.

Sponsored by:	The FreeBSD Foundation
2013-11-11 12:34:30 +00:00
ray
ce49cf77c2 Eliminate call to vd_blank method, it is too expensive.
Sponsored by:	The FreeBSD Foundation
2013-11-11 12:26:35 +00:00
ray
e62bfaecf6 Use saved offset to font aligned area.
Sponsored by:	The FreeBSD Foundation
2013-11-11 12:24:17 +00:00
ray
132f448cdd Save offset to font aligned area.
Sponsored by:	The FreeBSD Foundation
2013-11-11 12:22:44 +00:00
ray
76a7e05ec7 Add vt_mouse_event mouth event handling method.
Sponsored by:	The FreeBSD Foundation
2013-11-11 12:19:26 +00:00
ray
5c96d5741b o Remove include of sys/mouse.h, it is included from vt.h now.
o Call vt_mouse_event method, to notify VT(9) about mouse events.
o Add empty MOUSE_MOUSECHAR ioctl handler.
o Remove trailing whitespace.

Sponsored by:	The FreeBSD Foundation
2013-11-11 12:15:52 +00:00
ray
b8f44376b1 Use vtbuf_iscursor method instead of macro to get chars to display inverted.
Sponsored by:	The FreeBSD Foundation
2013-11-11 12:10:26 +00:00
ray
9ce47de113 Add mouse related bits.
Sponsored by:	The FreeBSD Foundation
2013-11-11 12:08:43 +00:00
ray
b581831acb Define marker support functions and type of markers.
Sponsored by:	The FreeBSD Foundation
2013-11-11 11:55:22 +00:00
ray
cd98b12538 Add cut/paste region markers.
Sponsored by:	The FreeBSD Foundation
2013-11-11 11:53:08 +00:00
ray
0ff0e79509 Add mouse related vtbuf operations.
Sponsored by:	The FreeBSD Foundation
2013-11-11 11:50:17 +00:00
ray
f83cd06fa5 Add default cursor pixmap.
Sponsored by:	The FreeBSD Foundation
2013-11-11 11:46:41 +00:00
ray
1422af8dad Rename font_default.c to vt_font_default.c. Prefix will make less possibility
for object file names collision.

Sponsored by:	The FreeBSD Foundation
2013-11-11 11:45:47 +00:00
ray
62241f0d6a Add mouse cursor format structure.
Sponsored by:	The FreeBSD Foundation
2013-11-11 11:37:02 +00:00
ray
0f856870cd Use opt_syscons.h to get defines.
Define max number of windows as VT_MAXWINDOWS if defined, or as MAXCONS, or 12.
Define VT_MOUSE_PASTEBUTTON and VT_MOUSE_EXTENDBUTTON if defined
SC_TWOBUTTON_MOUSE or VT_TWOBUTTON_MOUSE.

Sponsored by:	The FreeBSD Foundation
2013-11-11 11:30:47 +00:00
ray
89ea1ab094 Handle suspend/resume. Switch to console window before suspend, switch back on
resume. That fix issue with broken Xorg image after resume.
Fix some style whilst here.

Sponsored by:   The FreeBSD Foundation
2013-11-07 21:08:52 +00:00
ray
147123a2c6 Early console with FDT/OFW support.
TODO - done PPC, SPARC64 and FDT-less variants.

Sponsored by:	The FreeBSD Foundation
2013-11-05 23:09:36 +00:00
ray
1e2852a5da Export vt_fb VT driver methods to allow reuse.
Sponsored by:	The FreeBSD Foundation
2013-11-05 23:01:57 +00:00
ray
24c8405a42 Define default size for early console to 640x480.
Sponsored by:	The FreeBSD Foundation
2013-11-05 23:00:26 +00:00
ray
1f23a20cd6 Increase history size to 500 lines.
Sponsored by:	The FreeBSD Foundation
2013-11-05 22:59:11 +00:00
ray
e4cf6ae315 Enable splash on Mute flag.
TODO: use tunable for control splash.

Sponsored by:	The FreeBSD Foundation
2013-11-05 22:57:05 +00:00
ray
71ed33b8c0 Notify DRM about panic or kdb enter happen. So we can see kernel messages in
that case.
To investigate: Return from kdb is broken, seems due to locks usage. TODO

Sponsored by:	The FreeBSD Foundation
2013-11-04 09:01:52 +00:00
ray
3ec83506b8 Fix copyrights.
Sponsored by:	The FreeBSD Foundation
2013-11-02 14:20:29 +00:00
ray
630a3895d3 o Remove extra check for status of processes who hold terminals.
o Clean up and comment things.

Sponsored by:	The FreeBSD Foundation
2013-10-30 15:25:23 +00:00
nwhitehorn
019d0aadbc Remove some local changes unrelated to r257294. 2013-10-29 00:56:21 +00:00
nwhitehorn
012978f9de It is perfectly possible for keyboard drivers to queue up more than one
key press per notification call. Loop until there are no more queued
key presses, like syscons did. This fixes stuttering observed in particular
on key repeats with ADB and USB keyboards.
2013-10-29 00:52:02 +00:00
nwhitehorn
5e9e540ff9 Get colors right on mac framebuffers. 2013-10-27 15:14:27 +00:00
ray
d0cb2349bc Move tools to proper place.
Sponsored by:	The FreeBSD Foundation
2013-10-26 14:57:08 +00:00
ray
34e507fb2b Remove not done and not used driver for intel video.
Sponsored by:	The FreeBSD Foundation
2013-10-25 21:57:03 +00:00
ray
40b4804223 o Mute keyboard input when ScrollLock mode is active.
o Simplify keys handling.
o Send ESC sequence for arrow keys in _cngetc, that will fix DDB history.

Sponsored by:	The FreeBSD Foundation
2013-10-24 21:54:24 +00:00
ray
41788ddb71 o Fix scroll calculations.
o Make vthistory_seek to return amount of lines to update +on_top/-on_bottom of
    screen.

Sponsored by:	The FreeBSD Foundation
2013-10-24 21:43:46 +00:00
ray
b5d885c5f9 Use copy method which maybe defined by framebuffer provider, but not just
memmove.

Sponsored by:	The FreeBSD Foundation
2013-10-23 19:45:14 +00:00
ray
baa491bf97 Turn off confusing rotation of scroll history.
Sponsored by:	The FreeBSD Foundation
2013-10-23 14:15:46 +00:00
ray
f561b1bcf8 Add new vt_buf flag VBF_HISTORY_FULL - whole history filled.
Sponsored by:	The FreeBSD Foundation
2013-10-23 13:35:46 +00:00
ray
3d72b52090 MFC @r256953 2013-10-23 09:21:14 +00:00
ray
280385557c Add VT(9) driver for generic framebuffer.
Sponsored by:	The FreeBSD Foundation
2013-10-22 14:39:32 +00:00
ray
445adb5a17 o Do not blank screen on window resize.
o Force resize for first window (usually console).
o Inform user on driver changes.
o Reverse priority. Bigger now better.

Sponsored by:	The FreeBSD Foundation
2013-10-22 14:37:20 +00:00
ray
340eef3034 Reverse priority. Bigger now better.
Sponsored by:	The FreeBSD Foundation
2013-10-22 14:32:42 +00:00
ray
79df61c265 Hardware specific drivers have bigger priority (over VGA for example).
Sponsored by:	The FreeBSD Foundation
2013-10-22 13:56:42 +00:00
ray
6ed638c56a Don't forget to clean terminal window memory. But colors makes more smiles.
Sponsored by:	The FreeBSD Foundation
2013-10-22 13:53:58 +00:00
nwhitehorn
b3603dddc9 Use vt_generate_vga_palette() instead of a hard-coded mapping. 2013-10-17 12:58:40 +00:00
nwhitehorn
e017f126bd Sync with ofw_syscons.c: provide support for IBM framebuffers like that in
the QEMU pSeries emulated platform.
2013-10-17 12:15:21 +00:00
ray
811d5b66f4 Add helper to generate color map.
Sponsored by:	The FreeBSD Foundation
2013-10-15 12:54:47 +00:00
ray
7ea5fdc791 o Rename bitblt method to bitbltchr, since it used to copy char with bg/fg colors
from font table, but not bitmap copy.
o Fix small mistake in comment.

Sponsored by:	The FreeBSD Foundation
2013-10-15 12:28:24 +00:00
ray
2324fc717d Fix off-by-one-huge-fb-line copy-pasted to every driver.
TODO: defaulting to single implementation for all FB devices.

Sponsored by:	The FreeBSD Foundation
2013-10-11 13:07:31 +00:00
ray
eb8d243e76 Forget about vt_history.c.
Sponsored by:	The FreeBSD Foundation
2013-10-08 12:42:52 +00:00
ray
c7a97e97fa o Implement history buffer.
o Join history buffer with screen buffer. Same type of things.
o Reimplement buffer as an array of rows. Make it circular, so no overflow
	tracking.
o Implement VT_PROCESS mode. Locking of VT switching by owner process.
o Add debug and deadtimer sysctls. deadtimer - defaulting to 15 seconds, time
	to wait process answer in VT_PROCESS mode, to do VT switch in case when
	process hang.
o Implement later console attach.
o Fix (partially yet) keyboard allocation.
o Add drivers priority. Disallow to replace KMS driver with VGA.
o Add ability to resize terminals.

Sponsored by:	The FreeBSD Foundation
2013-10-08 12:40:04 +00:00
nwhitehorn
e040073849 Squash clang warnings. 2012-12-02 22:21:40 +00:00
marcel
87eebffb87 Add support fot ia64. This means that ia64, for the first time ever,
has a working non-serial console!

I'm pretty sure this doesn't work on the SGI Altix 350, but that's
ok for now. Lot's of things don't work there...
2012-04-14 00:27:50 +00:00
nwhitehorn
946cece192 Make sure to initialize early-boot keyboard drivers, as is apparently
required for the Sun UART-based keybaord driver to attach correctly. With
this change, vt(4) now works perfectly on sparc64 (at least on supported
hardware).
2012-01-22 19:49:43 +00:00
nwhitehorn
4f9511a9d0 Checkpoint SPARC support. This seems to inexplicably crash fairly early on
somewhere outside of ofwfb.c. It is in no way clear why.
2012-01-21 22:18:33 +00:00
nwhitehorn
49e7de5660 Make ofwfb static framebuffer much smaller by actually reading how you
are supposed to do this kind of thing.
2012-01-21 18:54:19 +00:00
nwhitehorn
1fa9866b98 Add a vt(4) framebuffer for Open Firmware linear framebuffer devices (i.e.
all graphics on PowerPC Apple systems). This will also work on some sparc64
graphics hardware with a small amount of modification.
2012-01-21 17:59:50 +00:00
ed
629157c416 Upgrade to Terminus 4.36. 2011-10-08 09:15:04 +00:00
ed
558236aac4 Chase KPI change in vga driver. 2011-03-23 06:31:45 +00:00
ed
317f07118c Update the terminus font to version 4.32.
This version doesn't add new glyphs, but contains small changes to some
characters, even including the letters M and W.
2011-03-22 21:39:57 +00:00
ed
98e93f6b12 Readd the vt(4) driver and corresponding tools. 2011-03-22 21:31:31 +00:00