| Commit message (Collapse) | Author | Age | Lines | ||
|---|---|---|---|---|---|
| ... | |||||
| * | render: make sure the current view is allocated and visible | Daniel Eklöf | 2019-08-04 | -8/+8 | |
| | | |||||
| * | csi: add 'unimplemented' warnings for things we handle but ignore | Daniel Eklöf | 2019-08-04 | -6/+19 | |
| | | |||||
| * | selection: insert newlines only when last column is empty | Daniel Eklöf | 2019-08-04 | -7/+14 | |
| | | |||||
| * | osc: bug: uneven clipboard bytes where not buffered correctly | Daniel Eklöf | 2019-08-03 | -2/+4 | |
| | | | | | | | | | | | | | When responding to a OSC 52 clipboard request, we need to base64 encode the clipboard data. This is done in, potentially, several calls. Since we need at least 3 bytes to be able to produce any base64 output, we may have to buffer up to 2 bytes between the callback calls with clipboard data. This was being done incorrectly, where both bytes were written to index 0 in the buffer. | ||||
| * | term: cell erase: reset *all* attributes *except* background | Daniel Eklöf | 2019-08-03 | -4/+1 | |
| | | |||||
| * | osc: remove TODO | Daniel Eklöf | 2019-08-03 | -2/+0 | |
| | | |||||
| * | cell: pack more efficiently and store glyph as a wchar | Daniel Eklöf | 2019-08-02 | -129/+146 | |
| | | | | | | | | | | | | The 'attributes' struct is now 8 bytes and naturally packed (used to be 9 bytes, artificially packed). 'cell' struct is now 12 bytes, naturally packed (used to be 13 bytes, artificially packed). Furthermore, the glyph is stored as a wchar instead of a char*. This makes it easier (faster) to do glyph lookup when rendering. | ||||
| * | term: implement reset | Daniel Eklöf | 2019-08-01 | -2/+86 | |
| | | |||||
| * | render: special case worker-count == 0 | Daniel Eklöf | 2019-08-01 | -31/+60 | |
| | | | | | | Allow render worker count to be 0, in which case the main thread renders the entire screen. | ||||
| * | threads: set thread titles | Daniel Eklöf | 2019-08-01 | -0/+15 | |
| | | |||||
| * | conf: make number of scrollback lines configurable | Daniel Eklöf | 2019-08-01 | -2/+17 | |
| | | |||||
| * | render: always damage two cells when rendering the cursor | Daniel Eklöf | 2019-07-31 | -1/+1 | |
| | | | | | | Hack to render cursor-at-double-width-characters correctly. Should be replaced with something better. | ||||
| * | render: draw cell decorations (cursor, underline etc) correctly for double-width characters | Daniel Eklöf | 2019-07-31 | -37/+38 | |
| | | |||||
| * | font: initial support for double-width *and* color emoji glyphs | Daniel Eklöf | 2019-07-31 | -56/+106 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fonts are now loaded with FT_LOAD_COLOR and we recognize and support the FT_PIXEL_MODE_BGRA pixel mode. This is mapped to a CAIRO_FORMAT_ARGB32 surface, that is blitted as-is (instead of used as a mask like we do for gray and mono glyphs). Furthermore, since many emojis are double-width, we add initial support for double-width glyphs. These are assumed to always be utf8. When PRINT:ing an utf8 character, we check its width, and add empty "spacer" cells after the cell with the multi-column glyph. When rendering, we render the columns in each row backwards. This ensures the spacer cells get cleared *before* we render the glyph (so that we don't end up erasing part of the glyph). Finally, emoji fonts are usually bitmap fonts with *large* glyphs. These aren't automatically scaled down. I.e. even if we request a glyph of 13 pixels, we might end up getting a 100px glyph. To handle this, fontconfig must be configured to scale bitmap fonts. When it is, we can look at the 'scalable' and 'pixelsizefixup' properties, and use these to scale the rendered glyph. | ||||
| * | vt: disable flash on bell, it's too annoying in e.g. zsh | Daniel Eklöf | 2019-07-30 | -1/+1 | |
| | | |||||
| * | vt: BELL is now logged at info level, and flashes the screen | Daniel Eklöf | 2019-07-30 | -1/+2 | |
| | | |||||
| * | osc: reduce flash interval to 50ms | Daniel Eklöf | 2019-07-30 | -2/+1 | |
| | | |||||
| * | term: break out 'flash' to a separate 'term' function | Daniel Eklöf | 2019-07-30 | -13/+19 | |
| | | |||||
| * | footrc: add 'workers' | Daniel Eklöf | 2019-07-30 | -0/+1 | |
| | | |||||
| * | config: remove commented out code | Daniel Eklöf | 2019-07-30 | -2/+0 | |
| | | |||||
| * | render: make resize log messages debug messages | Daniel Eklöf | 2019-07-30 | -1/+1 | |
| | | |||||
| * | main: don't shadow final return value inside poll loop | Daniel Eklöf | 2019-07-30 | -3/+3 | |
| | | |||||
| * | selection: add a couple of word-breaking characters | Daniel Eklöf | 2019-07-30 | -4/+22 | |
| | | | | | | | When "auto-selecting" a word, we used to only break on space characters. Now we break on a number of other characters as well. | ||||
| * | log: syslog: tag unused function arguments as unused | Daniel Eklöf | 2019-07-30 | -2/+4 | |
| | | |||||
| * | log: log to syslog too | Daniel Eklöf | 2019-07-30 | -3/+66 | |
| | | |||||
| * | main: font metrics should be debug logged | Daniel Eklöf | 2019-07-30 | -3/+1 | |
| | | |||||
| * | vt: remove almost all abort() calls | Daniel Eklöf | 2019-07-30 | -83/+49 | |
| | | | | | | | Replace with generic error log messages that simply says the ESC/CSI/OSC sequence is unhandled. This can mean either invalid or unimplemented, depending on the context. | ||||
| * | render: don't pass a struct buffer when all we need is a cairo_t | Daniel Eklöf | 2019-07-30 | -23/+18 | |
| | | |||||
| * | render: don't call wl_surface_set_buffer_scale() | Daniel Eklöf | 2019-07-30 | -3/+4 | |
| | | | | | | | Since we don't support scaling, don't call wl_surface_set_buffer_scale(). This way, at least will get auto-scaled by the compositor. | ||||
| * | render: remove #if 0 code | Daniel Eklöf | 2019-07-30 | -15/+0 | |
| | | |||||
| * | vt: remove duplicate initialization warnings (clang) | Daniel Eklöf | 2019-07-30 | -3/+0 | |
| | | |||||
| * | render: fix 'suggest braces around initialization...' warning (clang) | Daniel Eklöf | 2019-07-30 | -1/+1 | |
| | | |||||
| * | input: fix 'comparison ... is always true' warning (clang) | Daniel Eklöf | 2019-07-30 | -3/+3 | |
| | | |||||
| * | render: only explicitly re-render old cursor cell if it isn't dirty | Daniel Eklöf | 2019-07-30 | -13/+11 | |
| | | | | | | If it is dirty, it will be rendered in the normal rendering process. | ||||
| * | render: last_cursor.cell must not be const | Daniel Eklöf | 2019-07-30 | -1/+1 | |
| | | |||||
| * | render: remove all traces of glyph-sequence | Daniel Eklöf | 2019-07-30 | -61/+0 | |
| | | | | | | This was used to optimize the call(s) to cairo_show_glyphs(), which we aren't using anymore. | ||||
| * | input: use keyboard enter serial only for selection serial | Daniel Eklöf | 2019-07-30 | -7/+0 | |
| | | |||||
| * | Merge branch 'multithreaded-renderer' | Daniel Eklöf | 2019-07-30 | -225/+595 | |
| |\ | |||||
| | * | main: pty buffers appear to be ~20KB on modern linux kernels | Daniel Eklöf | 2019-07-30 | -1/+1 | |
| | | | |||||
| | * | font: add support for fallback fonts | Daniel Eklöf | 2019-07-30 | -125/+278 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A top-level font now has a list of fallback fonts. When a glyph cannot be found, we try each fallback font in turn, until we either find one that has the glyph, or until we've exhausted the list. To make this actually work in practise (read: to make performance acceptable), the cache is re-worked and is now populated on demand. It also supports non-ASCII characters, by using the 4-byte unicode character as index instead. Since having an array that can be indexed by a 4-byte value isn't really viable, we now have a simple hash table instead of an array. | ||||
| | * | render: add a 'clean' bit to each cell; only render cells that aren't clean | Daniel Eklöf | 2019-07-30 | -33/+52 | |
| | | | | | | | | | | | | | | | | | | | | | | | This patch takes a bit from the foreground color value in a cell (todo: split up foreground/background into bitfields with a separate field for 'foreground/background' has been set), and only re-renders cells that aren't marked as clean. Note: we use a 'clean' bit rather than a 'dirty' bit to make it easy to erase cells - we can (keep doing) do that by simply memsetting a cell range to 0. | ||||
| | * | wip: initial multithreaded renderer | Daniel Eklöf | 2019-07-29 | -89/+287 | |
| |/ | |||||
| * | Merge branch 'use-freetype-to-render-glyphs' | Daniel Eklöf | 2019-07-29 | -129/+316 | |
| |\ | |||||
| | * | font: set FT load and render flags from FontConfig properties | Daniel Eklöf | 2019-07-29 | -21/+129 | |
| | | | |||||
| | * | font: populate glyph cache (ASCII characters only) when instantiating font | Daniel Eklöf | 2019-07-28 | -82/+44 | |
| | | | |||||
| | * | font: add font_glyph_for_utf8() | Daniel Eklöf | 2019-07-28 | -76/+94 | |
| | | | | | | | | | | | | | This function fills in a struct glyph with glyph bitmap data for the provided utf-8 character (essentially a FT_Bitmap wrapped in a cairo surface). | ||||
| | * | cairo-ft: remove all usages of cairo-ft | Daniel Eklöf | 2019-07-28 | -78/+4 | |
| | | | |||||
| | * | main: calculate *all* font metrics from the FreeType face | Daniel Eklöf | 2019-07-28 | -9/+24 | |
| | | | |||||
| | * | render: use FreeType face from font, instead of from cairo's scaled font | Daniel Eklöf | 2019-07-28 | -6/+2 | |
| | | | |||||
| | * | font: load FreeType face, and set it's pixel sizes | Daniel Eklöf | 2019-07-28 | -25/+63 | |
| | | | |||||
| | * | render: poc: use freetype to render glyphs | Daniel Eklöf | 2019-07-26 | -0/+124 | |
| |/ | | | | | | | | | | | | | | Initial POC that uses freetype to render the glyphs. The bitmap produced by freetype contains the alpha value. We use this bitmap in a mask surface and then draw the final glyph with cairo by applying the source rgb using the OVER operator and the freetype generated alpha mask as surface mask. Note that we only support grayscale antialiasing (and no antialiasing). We are probably not setting the antialias options correctly either. | ||||
| * | render: reset "last cursor" when resizing | Daniel Eklöf | 2019-07-26 | -2/+2 | |
| | | | | | | The cell pointer is likely invalid since we realloc the grids. Besides. we're redrawing the entire window anyway. | ||||
| * | render: flush glyph sequence after erase previous cursor | Daniel Eklöf | 2019-07-26 | -4/+8 | |
| | | | | | | If not, we may have scrolled when we later flush the glyph sequence, causing the glyph to be rendered in wrong location. | ||||
| * | input: generate escape sequences for "other" keys | Daniel Eklöf | 2019-07-26 | -6/+34 | |
| | | | | | | This corresponds to xterm's modifyOtherKeys option, though the code needs more testing and cleanup. | ||||
| * | mouse: use discrete axis event if available | Daniel Eklöf | 2019-07-26 | -23/+37 | |
| | | | | | This improves the scroll experience with certain devices | ||||
| * | render: add render_row() | Daniel Eklöf | 2019-07-24 | -7/+13 | |
| | | |||||
| * | render: minor | Daniel Eklöf | 2019-07-24 | -1/+2 | |
| | | |||||
| * | footrc: add cursor color | Daniel Eklöf | 2019-07-24 | -0/+1 | |
| | | |||||
| * | render: move local static variables into the terminal struct | Daniel Eklöf | 2019-07-24 | -31/+36 | |
| | | |||||
| * | render: move frame_callback to term.render | Daniel Eklöf | 2019-07-24 | -9/+11 | |
| | | |||||
| * | render: add render_refresh() | Daniel Eklöf | 2019-07-24 | -16/+16 | |
| | | |||||
| * | render: bug: previous cursor wasn't always redrawn correctly | Daniel Eklöf | 2019-07-24 | -39/+56 | |
| | | | | | | | | | | | | | | | | | | | | | The main problem is knowing: * The correct *cell* (to be able to render the *content* when erasing the old cursor) * Whether the cursor has moved (to determine whether to stop the rendering loop or not) * Where on the *screen* the cursor is/was (since the terminal may be partly scrolled back) This patch stores three static variables: * last_cursor is used to compare against current cursor to see if the cursor has moved or not * last_cursor_on_screen is the actual screen coordinates the cursor was rendered at (typically the same as last_cursor, but may be offset by the view) * last_cursor_cell is a pointer to the cell to render | ||||
| * | conf: allow the user to configure a fixed cursor color | Daniel Eklöf | 2019-07-23 | -15/+81 | |
| | | | | | | | | | | | | | | | | | | | | The default is to reverse the foreground/background colors in the cell with the cursor. But, if the user configures a specific set of cursor colors, those will always be used, regardless of other cell attributes (dim, reverse etc). The cursor color is specified as two color values, 'text' and 'cursor'. The block cursor uses the 'cursor' color as background, and the 'text' color for the glyph. All other cursor styles uses the 'cursor' color for the cursor, but uses the cell's foreground color for the glyph (meaning, dim/reverse/etc applies). | ||||
| * | csi: ignore CSI ?1036h/l (metaSendsEscape) | Daniel Eklöf | 2019-07-23 | -0/+9 | |
| | | |||||
| * | term: make sure to update 'current row' when restoring saved cursor | Daniel Eklöf | 2019-07-23 | -3/+20 | |
| | | |||||
| * | grid: swap rows doesn't mark rows as dirty | Daniel Eklöf | 2019-07-23 | -3/+0 | |
| | | |||||
| * | osc: ignore OSC 30 (konsole's "set tab title") | Daniel Eklöf | 2019-07-23 | -1/+7 | |
| | | |||||
| * | csi: implement \E[Z - back tab | Daniel Eklöf | 2019-07-22 | -1/+10 | |
| | | |||||
| * | csi: *sigh* looks like e.g. neovim doesn't respect Se | Daniel Eklöf | 2019-07-22 | -9/+6 | |
| | | | | | | | | | I.e. it issues a \E[2 q regardless of what we've configured the terminfo Se entry to. So, make \E[2 q mean "the user configured cursor style" (which defaults to 'block'). | ||||
| * | csi: let CSI 0 q mean "switch to user configured cursor style" | Daniel Eklöf | 2019-07-22 | -3/+11 | |
| | | | | | | | | | According to the specs, \E[0 q means a blinking block cursor. However, since it also states that \E[1 q *also* is a blinking block cursor, and that it is the default, *and* given that fact that parameter-less CSIs typically means "reset", let's make it mean "reset to the user configured cursor style". | ||||
| * | conf: make cursor's default style configurable | Daniel Eklöf | 2019-07-22 | -1/+48 | |
| | | |||||
| * | render: implement cursor styles 'bar' and 'underline' | Daniel Eklöf | 2019-07-22 | -49/+94 | |
| | | |||||
| * | csi: prepare for alternative cursor styles | Daniel Eklöf | 2019-07-22 | -12/+19 | |
| | | |||||
| * | term: group 'blink' state together in a struct | Daniel Eklöf | 2019-07-22 | -17/+21 | |
| | | |||||
| * | term: group 'flash' state together in a struct | Daniel Eklöf | 2019-07-22 | -14/+18 | |
| | | |||||
| * | flash: convert our own 'flash' from a CSI to an OSC | Daniel Eklöf | 2019-07-22 | -17/+25 | |
| | | |||||
| * | csi: implement CSI 3J - erase scroll back | Daniel Eklöf | 2019-07-22 | -0/+23 | |
| | | |||||
| * | keymap: fix sequences for PageDown | Daniel Eklöf | 2019-07-22 | -7/+7 | |
| | | |||||
| * | terminfo: add key sequences for keys with modifiers | Daniel Eklöf | 2019-07-22 | -6/+58 | |
| | | |||||
| * | terminfo: add Se/Ss - describes how to change cursor style | Daniel Eklöf | 2019-07-22 | -0/+2 | |
| | | |||||
| * | terminfo: add Ms - modify selection/clipboard | Daniel Eklöf | 2019-07-22 | -0/+1 | |
| | | |||||
| * | terminfo: add smxx/rmxx - describes strikeout/crossed-out | Daniel Eklöf | 2019-07-22 | -0/+2 | |
| | | |||||
| * | terminfo: set XT (screen) - we understand OSC and mouse tracking | Daniel Eklöf | 2019-07-22 | -0/+1 | |
| | | |||||
| * | terminfo: set AX (screen) - we understand CSI 39/49m | Daniel Eklöf | 2019-07-22 | -0/+1 | |
| | | |||||
| * | conf: don't fail to start when there's no configuration file | Daniel Eklöf | 2019-07-22 | -0/+1 | |
| | | |||||
| * | terminfo: revert kmous to \E[M | Daniel Eklöf | 2019-07-21 | -2/+10 | |
| | | | | | | ncurses disables mouse support completely if kmous != \E[M. Now, since kmous *has* to match XM, this means we must also disable XM. | ||||
| * | terminfo: since we now expose our SGR cap, set kmous=\E< | Daniel Eklöf | 2019-07-21 | -1/+1 | |
| | | |||||
| * | terminfo: add XM (mouse initialization) | Daniel Eklöf | 2019-07-21 | -2/+2 | |
| | | |||||
| * | csi: bug: reset mouse *reporting* on CSI 1005/1006/1015l | Daniel Eklöf | 2019-07-21 | -1/+4 | |
| | | |||||
| * | csi: remove debug logging | Daniel Eklöf | 2019-07-21 | -2/+0 | |
| | | |||||
| * | main: no need to damage the _entire_ view on blink timer | Daniel Eklöf | 2019-07-21 | -1/+11 | |
| | | |||||
| * | blink: implement 'blink' | Daniel Eklöf | 2019-07-21 | -1/+79 | |
| | | |||||
| * | csi: change flash log message from warning to debug | Daniel Eklöf | 2019-07-21 | -1/+1 | |
| | | |||||
| * | flash: implement 'flash' | Daniel Eklöf | 2019-07-21 | -22/+84 | |
| | | | | | | | | | | | Use our own escape sequence for the 'flash' terminfo entry. Implemented by arming a timer FD and setting a boolean that indicates we're currently "flashing". The renderer draws a semi-transparent yellowish layer over the entire window when "flashing" is active. | ||||
| * | csi: remove erronous final | Daniel Eklöf | 2019-07-21 | -10/+2 | |
| | | |||||
| * | dcs: we have no parent terminal to pass through to | Daniel Eklöf | 2019-07-21 | -59/+1 | |
| | | |||||
| * | conf: remove debug logging | Daniel Eklöf | 2019-07-21 | -2/+0 | |
| | | |||||
| * | csi: implement CSI 22t and CSI 23t | Daniel Eklöf | 2019-07-21 | -6/+38 | |
| | | | | | | | | | | | | 22;0|1|2t pushes the current window title/icon to the stack, while 23 pops it. The second parameter, 0|1|2 has the following meaning: 0 - push/pop icon+title 1 - push/pop icon 2 - push/pop title | ||||
| * | term: track current window title in terminal struct | Daniel Eklöf | 2019-07-21 | -4/+17 | |
| | | |||||
| * | csi: remove TODO; we have our own terminfo | Daniel Eklöf | 2019-07-21 | -7/+0 | |
| | | |||||
