| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| |
|
|
|
|
| |
This fixes an issue where an 'underline' cursor wasn't visible on
underlined text - the cursor was rendered first, and then shadowed by
the text underline.
|
| |
|
|
|
|
|
|
|
|
|
| |
Update the sixels' 'row' attribute when re-flowing a grid, to ensure
it is rendered at the correct place.
This should work in most cases, but will break when the cell size has
changed (e.g. font size increase/decrease, or a DPI change).
This patch also moves the sixel image list from the terminal struct
into the grid struct. The sixels are per-grid after all.
|
| |
|
|
|
|
|
|
|
|
| |
Handle the CSDs and the search box the same way we handle the main
grid; when we need to redraw them, call
render_refresh_{csd,search}(). This sets a flag that is checked after
each FDM iteration. All actual rendering is done here.
This also ties the commits of the Wayland sub-surfaces to the commit
of the main surface.
|
| |
|
|
|
|
|
|
|
|
| |
* minimize: a downward triangle
* maximize (window): an upward triangle
* maximize (already maximized): a hollow square
* close: a filled square
The glyphs are now rendered using the default background color instead
of hardcoded to black.
|
| |
|
|
|
|
|
| |
Applications may temporarily change the foreground color. Don't use
this when rendering the CSD title bar - use the default
foreground (i.e the default default one, or the one configured by the
user in footrc).
|
| | |
|
| |
|
|
|
|
| |
This ensures content in the last column doesn't flow over into the
margins (where they are typically never erased, unless the window is
resized).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
But it *does* include the title bar. This simplifies the 'adjustment'
needed to be done to the configured window size.
It also fixes a number of issues:
* the compositor will now properly snap the window to screen
edges (before, there was an empty space between the edge and the
window - the CSD border).
* This also removes the need for the mutter 'commit' workaround. We
must be doing something right now.
|
| |
|
|
|
| |
This ensures the inner most child surfaces are rendered and comitted
before the parent surfaces.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
That is, remove all configuration options and always draw them fully
transparent.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
These are really ugly, but is meant to get something up there, that
can be polished afterwards.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The user can now configure the following:
* Whether to prefer CSDs or SSDs. But note that this is only a hint to
the compositor - it may deny our request. Furthermore, not all
compositors implement the decoration manager protocol, meaning CSDs
will be used regardless of the user configuration (GNOME/mutter
being the most prominent one).
* Title bar size and color, including transparency
* Border size and color, including transparency
Also drop support for rendering the CSDs inside the main surface.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
So, make it equal to the window size, and make the non-used area fully
transparent.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This fixes an issue where the CSDs and the search box was incorrectly
positioned when output's scale != 1.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This gives the illusion that window is border-less, but still gives us
surfaces the user can grab to resize the window.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
When the compositor wants us to decide the size (it sends a configure
event with width/height == 0), then use the last unmaximized size, if
there is one.
If there isn't one, use the size from the user configuration.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Up until now, we've centered the grid on the main surface. Meaning, we
calculated the unusable area, added the user configured padding and
then centered the grid.
This may look nice at first, but doesn't anymore when you start
resizing the window. Resizing the window will cause the top+left
margins to change, which makes the text "jump" or "wobble".
So, now we fix the grid in the upper left corner defined by the user
configured padding (plus CSDs if they aren't positioned outside the
main surface).
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For now, this behavior is controlled with an ifdef. At least kwin
seems very buggy when the decorations are positioned like this (but
normally you'd use server-side decorations with kwin anyway).
This commit also changes 'use_csd' to be a tri-state variable;
when instantiating a window it is set to 'unknown'.
If there's no decoration manager available (e.g. weston), we
immediately set it to 'yes' (use CSDs).
Otherwise, we wait for the decoration manager callback to indicate
whether we should use CSDs or not.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
The CSDs doesn't need to be re-drawn each time we redraw the grid,
only when the window is resized.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
* Still no content in the title bar
* Colors are temporary
* No resize/drag yet
|
| |\ |
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In unhook, add the generated image to a list of finished sixel images,
along with positioning and size information.
When rendering, loop this list of images, and render the images (or
parts of) that are visible.
When scrolling, check if any part of the images cover the re-cycled
lines, and if so, remove the *entire* image from the list.
This means we have the following limitations:
* The renderer always renders the whole (visible area of) the
image(s). There are times when this isn't necessary - for example,
when the image is scrolled inside the visible area.
* It would be nice if we could crop the image when parts of it is
scrolled out.
|
| |
|
|
|
|
|
|
|
| |
This implements basic parsing of sixel data. Lots of limitations and
temporary solutions as this is still work-in-progress:
* Maximum image size hardcoded to 800x800
* No HLS color format support
* Image is always rendered at 0x0 in the terminal
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
The old selection will no longer be valid once we resize the grids.
|
| |
|
|
|
|
|
|
| |
The 'last-row' variable points to the last row the cursor is *on*,
thus it's not a counter, and we need to add one when calculating the
new grid offsets, or we get an off-by-one error.
With this, there's no longer any need to scroll the reflowed text.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To do text reflow, we only need to know if a line has been explicitly
linebreaked or not. If not, that means it wrapped, and that we
should *not* insert a linebreak when reflowing text.
When reflowing text, when reaching the end of a row in the old grid,
only insert a linebreak in the new grid if the old row had been
explicitly linebreaked.
Furthermore, when reflowing text and wrapping a row in the new grid,
mark the previous row as linebreaked if either the last cell was
(the last column in the last row) empty, or the current cell (the
first column in the new row) is empty. If both are non-empty, then we
assume a linewrap.
|
| |
|
|
|
|
|
|
| |
A window resize doesn't necessarily mean the grid layout changes. When
it doesn't, don't reflow text.
This fixes a slowness issue on Sway, when swapping positions of two
~equally sized windows.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This was intended to prevent a new prompt from being printed on a
newline. However, it breaks normal output under certain conditions,
that have yet to be determined exactly what they are.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
When current view is at a grid wrap around (last emitted row index is
< grid offset), the cursor row ended up being negative which we then
mapped to the top line.
This is wrong. When we're at a wrap around, re-adjust cursor by adding
the grid's row count.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
To handle text reflow correctly when a line has a printable character
in the last column, but was still line breaked, we need to track the
fact that the slave inserted a line break here.
Otherwise, when the window width is increased, we'll end up pulling up
the next line, when we really should have inserted a line break.
|
| |
|
|
|
| |
We set initialize=true when allocating a new row. This initializes the
cell to 0, with clean=1.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The algorithm is as follows:
Start at the beginning of the scrollback. That is, at the oldest
emitted lines. This is done by taking the current offset, and adding
the number of (old) screen rows, and then iterating until we find the
first allocated line.
Next, we iterate the entire old grid. At the beginning, we allocate a
line for the new grid, and setup a global pointer for that line, and
the current cell index.
For each line in the old grid, iterate its cells. Copy the the cells
over to the new line. Whenever the new line reaches its maximum number
of columns, we line break it by increasing the current row index and
allocating a new row (if necessary - we may be overwriting old
scrollback if the new grid is smaller than the old grid).
Whenever we reach the end of a line of the old grid, we insert a line
break in the new grid's line too **if** the last cell in the old line
was empty. If it was **not** empty, we **don't** line break the new
line.
Furthermore, empty cells in general need special consideration. A line
ending with a string of empty cells doesn't have to be copied the new
line. And more importantly, should **not** increase the new line's
cell index (which may cause line breaks, which is incorrect).
However, if a string of empty cells is followed by non empty cells, we
need to copy all the preceding empty cells to the line too.
When the entire scrollback history has been reflowed, we need to
figure out the new grid's offset.
This is done by trying to put the **last** emitted line at the bottom
of the screen. I.e. the new offset is typically "last_line_idx -
term->rows". However, we need to handle empty lines. So, after
subtracting the number of screen rows, we _increase_ the offset until
we see a non-empty line. This ensures we handle grid's that doesn't
fill an entire screen.
Finally, we need to re-position the cursor. This is done by trying to
place the cursor **at** (_not_ after) the last emitted line. We keep
the current cursor column as is (but possibly truncated, if the grid's
width decreased).
|
| |
|
|
|
| |
We've resized, and reset the render's 'last-buf' pointer; any scroll
damage we have is **not** valid anymore.
|
| |
|
|
|
| |
This forces a full resize operation, even though actual window
size (or scale) hasn't changed.
|
| |
|
|
|
| |
This should reduce the risk of mixing up an input timestamp with the
corresponding rendered frame.
|
| | |
|
| |
|
|
|
| |
Allow/disallow subpixel antialiasing in font_glyph_for_wc(), not using
font_enable_subpixel_antialias().
|
| | |
|
| | |
|
| |
|
|
| |
From render -> terminal
|
| |
|
|
|
| |
This ensures we can recover from a crashing (or bad behaving)
application that sends a BSU but then never sends an ESU.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Calling render_disable_refresh() causes update requests to that
terminal to be ignored.
Calling render_enable_refresh() re-enables updates.
|
| |
|
|
|
| |
Depending on the font, it may not have an entry for code point '0',
which will cause us to try to load fallback fonts.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously when updating a selection, we would unmark *all* cells in
the old selection, and then mark all cells in the new selection.
This caused *all* cells to be dirtied and thus re-rendered.
Avoid this, by adding a temporary state to the cells' selected state.
Before unmarking the old selection, pre-mark the new selection using a
temporary state.
When unmarking the old selection, ignore cells in this temporary state.
When marking the new selection, ignore cells in this temporary
state (except clearing the temporary state).
|
| | |
|