aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* main: don't shadow final return value inside poll loopDaniel Eklöf2019-07-30-3/+3
|
* selection: add a couple of word-breaking charactersDaniel Eklöf2019-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 unusedDaniel Eklöf2019-07-30-2/+4
|
* log: log to syslog tooDaniel Eklöf2019-07-30-3/+66
|
* main: font metrics should be debug loggedDaniel Eklöf2019-07-30-3/+1
|
* vt: remove almost all abort() callsDaniel Eklöf2019-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_tDaniel Eklöf2019-07-30-23/+18
|
* render: don't call wl_surface_set_buffer_scale()Daniel Eklöf2019-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 codeDaniel Eklöf2019-07-30-15/+0
|
* vt: remove duplicate initialization warnings (clang)Daniel Eklöf2019-07-30-3/+0
|
* render: fix 'suggest braces around initialization...' warning (clang)Daniel Eklöf2019-07-30-1/+1
|
* input: fix 'comparison ... is always true' warning (clang)Daniel Eklöf2019-07-30-3/+3
|
* render: only explicitly re-render old cursor cell if it isn't dirtyDaniel Eklöf2019-07-30-13/+11
| | | | | If it is dirty, it will be rendered in the normal rendering process.
* render: last_cursor.cell must not be constDaniel Eklöf2019-07-30-1/+1
|
* render: remove all traces of glyph-sequenceDaniel Eklöf2019-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 serialDaniel Eklöf2019-07-30-7/+0
|
* Merge branch 'multithreaded-renderer'Daniel Eklöf2019-07-30-225/+595
|\
| * main: pty buffers appear to be ~20KB on modern linux kernelsDaniel Eklöf2019-07-30-1/+1
| |
| * font: add support for fallback fontsDaniel Eklöf2019-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 cleanDaniel Eklöf2019-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 rendererDaniel Eklöf2019-07-29-89/+287
|/
* Merge branch 'use-freetype-to-render-glyphs'Daniel Eklöf2019-07-29-129/+316
|\
| * font: set FT load and render flags from FontConfig propertiesDaniel Eklöf2019-07-29-21/+129
| |
| * font: populate glyph cache (ASCII characters only) when instantiating fontDaniel Eklöf2019-07-28-82/+44
| |
| * font: add font_glyph_for_utf8()Daniel Eklöf2019-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-ftDaniel Eklöf2019-07-28-78/+4
| |
| * main: calculate *all* font metrics from the FreeType faceDaniel Eklöf2019-07-28-9/+24
| |
| * render: use FreeType face from font, instead of from cairo's scaled fontDaniel Eklöf2019-07-28-6/+2
| |
| * font: load FreeType face, and set it's pixel sizesDaniel Eklöf2019-07-28-25/+63
| |
| * render: poc: use freetype to render glyphsDaniel Eklöf2019-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 resizingDaniel Eklöf2019-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 cursorDaniel Eklöf2019-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" keysDaniel Eklöf2019-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 availableDaniel Eklöf2019-07-26-23/+37
| | | | This improves the scroll experience with certain devices
* render: add render_row()Daniel Eklöf2019-07-24-7/+13
|
* render: minorDaniel Eklöf2019-07-24-1/+2
|
* footrc: add cursor colorDaniel Eklöf2019-07-24-0/+1
|
* render: move local static variables into the terminal structDaniel Eklöf2019-07-24-31/+36
|
* render: move frame_callback to term.renderDaniel Eklöf2019-07-24-9/+11
|
* render: add render_refresh()Daniel Eklöf2019-07-24-16/+16
|
* render: bug: previous cursor wasn't always redrawn correctlyDaniel Eklöf2019-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 colorDaniel Eklöf2019-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öf2019-07-23-0/+9
|
* term: make sure to update 'current row' when restoring saved cursorDaniel Eklöf2019-07-23-3/+20
|
* grid: swap rows doesn't mark rows as dirtyDaniel Eklöf2019-07-23-3/+0
|
* osc: ignore OSC 30 (konsole's "set tab title")Daniel Eklöf2019-07-23-1/+7
|
* csi: implement \E[Z - back tabDaniel Eklöf2019-07-22-1/+10
|
* csi: *sigh* looks like e.g. neovim doesn't respect SeDaniel Eklöf2019-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öf2019-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 configurableDaniel Eklöf2019-07-22-1/+48
|
* render: implement cursor styles 'bar' and 'underline'Daniel Eklöf2019-07-22-49/+94
|
* csi: prepare for alternative cursor stylesDaniel Eklöf2019-07-22-12/+19
|
* term: group 'blink' state together in a structDaniel Eklöf2019-07-22-17/+21
|
* term: group 'flash' state together in a structDaniel Eklöf2019-07-22-14/+18
|
* flash: convert our own 'flash' from a CSI to an OSCDaniel Eklöf2019-07-22-17/+25
|
* csi: implement CSI 3J - erase scroll backDaniel Eklöf2019-07-22-0/+23
|
* keymap: fix sequences for PageDownDaniel Eklöf2019-07-22-7/+7
|
* terminfo: add key sequences for keys with modifiersDaniel Eklöf2019-07-22-6/+58
|
* terminfo: add Se/Ss - describes how to change cursor styleDaniel Eklöf2019-07-22-0/+2
|
* terminfo: add Ms - modify selection/clipboardDaniel Eklöf2019-07-22-0/+1
|
* terminfo: add smxx/rmxx - describes strikeout/crossed-outDaniel Eklöf2019-07-22-0/+2
|
* terminfo: set XT (screen) - we understand OSC and mouse trackingDaniel Eklöf2019-07-22-0/+1
|
* terminfo: set AX (screen) - we understand CSI 39/49mDaniel Eklöf2019-07-22-0/+1
|
* conf: don't fail to start when there's no configuration fileDaniel Eklöf2019-07-22-0/+1
|
* terminfo: revert kmous to \E[MDaniel Eklöf2019-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öf2019-07-21-1/+1
|
* terminfo: add XM (mouse initialization)Daniel Eklöf2019-07-21-2/+2
|
* csi: bug: reset mouse *reporting* on CSI 1005/1006/1015lDaniel Eklöf2019-07-21-1/+4
|
* csi: remove debug loggingDaniel Eklöf2019-07-21-2/+0
|
* main: no need to damage the _entire_ view on blink timerDaniel Eklöf2019-07-21-1/+11
|
* blink: implement 'blink'Daniel Eklöf2019-07-21-1/+79
|
* csi: change flash log message from warning to debugDaniel Eklöf2019-07-21-1/+1
|
* flash: implement 'flash'Daniel Eklöf2019-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 finalDaniel Eklöf2019-07-21-10/+2
|
* dcs: we have no parent terminal to pass through toDaniel Eklöf2019-07-21-59/+1
|
* conf: remove debug loggingDaniel Eklöf2019-07-21-2/+0
|
* csi: implement CSI 22t and CSI 23tDaniel Eklöf2019-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 structDaniel Eklöf2019-07-21-4/+17
|
* csi: remove TODO; we have our own terminfoDaniel Eklöf2019-07-21-7/+0
|
* render: make "new buffer" a debug log message, not warningDaniel Eklöf2019-07-21-1/+1
|
* footrc: example configurationDaniel Eklöf2019-07-21-0/+23
|
* conf: misc valgrind fixesDaniel Eklöf2019-07-21-22/+44
|
* Merge branch 'config-color'Daniel Eklöf2019-07-21-97/+203
|\
| * csi: pick 16 first 256-colors directly from the term structDaniel Eklöf2019-07-21-2/+19
| | | | | | | | | | | | | | | | | | | | The 16 first entries in the 256-color array are the regular and bright colors. However, since they can be changed (eventually) at runtime, we can't statically initialize the 256-color array. Instead, pick the regular+bright colors directly from the terminal struct. I.e. the first 16 entries of the 256-color array are now unused.
| * csi: use colors from terminal structDaniel Eklöf2019-07-21-26/+4
| |
| * conf: fg/bg and all regular + bright colors are now configurableDaniel Eklöf2019-07-21-4/+70
| |
| * conf: config now provides the colors (though still only hardcoded colors)Daniel Eklöf2019-07-21-59/+95
| |
| * term: prepare for configurable colors; add color variables to terminalDaniel Eklöf2019-07-21-10/+19
|/
* osc: add TODODaniel Eklöf2019-07-19-0/+2
|
* osc: delete empty lineDaniel Eklöf2019-07-19-1/+0
|
* osc: implement OSC 52;c;? - query clipboardDaniel Eklöf2019-07-19-38/+132
|
* selection: add text_from_clipboard()Daniel Eklöf2019-07-19-7/+30
| | | | | This function reads data from the clipboard, and calls a user-provided callback for each chunk of clipboard data.
* base64: implement encode()Daniel Eklöf2019-07-19-2/+73
|
* osc: initial implementation of OSC 52 - copy to clipboardDaniel Eklöf2019-07-19-0/+64
|
* selection: add text_to_clipboard()Daniel Eklöf2019-07-19-6/+17
| | | | This function takes a string and makes it available to the clipboard.
* input: store last seen wayland input serialDaniel Eklöf2019-07-19-1/+11
| | | | We need this for clipboard data
* base64: initial base64 decode implementationDaniel Eklöf2019-07-19-0/+92
|
* osc: foreground/background reply is now in correct XParseColor formatDaniel Eklöf2019-07-19-4/+13
| | | | | The format we used previously was a discouraged and obsolete format (and incorrect too).
* csi: recognize DECRQM (CSI ? Ps $ p)Daniel Eklöf2019-07-19-0/+23
| | | | | | The client sends this to request the state of DEC private modes. We don't support any of them, so for now, reply with 'reset'.
* csi: tweak logging: no need to mention 'CSI' twiceDaniel Eklöf2019-07-19-3/+3
|