Bind to xdg-shell version 2 if available, as this enables us to
track our window’s ‘tiled’ state in the ‘configure’ events.
This in turn allows us to stash the ‘old’ window size when being
tiled, to be used again when restoring the window size when un-tiled.
Add anew config option, ‘bell=none|set-urgency’. When set to
‘set-urgency’, the margins will be painted in red (if the window did
not have keyboard focus).
This is intended as a cheap replacement for the ‘urgency’ hint, that
doesn’t (yet) exist on Wayland.
Closes#157
An odd cell width/height sometimes resulted in an odd grid
size. Combined with a scaling factor of e.g. 2, that led to a rounding
error when converting pixel sizes to logical window sizes.
As a result, the _next_ configure event would cause us to loose a
pixel, which led to us dropping a row from the grid.
The initial window size is set *before* we’re initially mapped. This
means we don’t (yet) know on which output we’ll be mapped. _That_
means we don’t know which scaling factor to use.
This implements a best effort attempt, where we use the “guessed”
scaling factor. This will always be correct in single-monitor
configurations, but may be wrong in multi-monitor setups with
different scaling factors.
When enabled, foot will ‘damage’ the entire window, instead of just
the modified/updated rows.
This will force the compositor to redraw/blend the whole window.
This can be used to workaround an issue with fractional scaling in
Gnome, where random thin lines may appear.
Try to detect double-width *glyphs* for single-width *characters*, and
allow them to overflow into the next cell.
This is only done for single-width chars with a glyph width that is at
least 1.5 cells wide, but at most 3 cells.
The feature is gated by the new
‘tweak.allow-overflowing-double-width-glyphs’, and is disabled by
default.
Closes#116
When calculating where in the scrollback history we are, we previously
did this against the total number of scrollback lines. I.e. the
`scrollback.lines` setting in `footrc`.
Now, we count only the used/allocated scrollback lines.
Note that the initial indicator position might still seem to start a
bit high up, if the number of used scrollback lines is low. This is
because we use the *top* of the screen for the current position. Thus,
we'll never be at the bottom (except for the special case when
we're *really* at the bottom).
This can be set to 'none' (the default), 'osd', 'log' or 'both'.
When 'osd' is enabled, we'll render the frame rendering time to a
sub-surface after each frame.
When 'log' is enabled, the frame rendering time is logged on stderr.
The default is still to inverse the regular foreground/background
colors.
If the user sets *both* of the new options, selection-foreground and
selection-background, those colors will *always* be used for selected
cells, instead of inverting the regular foreground/background colors.
When enabled, the mouse cursor is hidden when the user types in the
terminal. It is un-hidden when the user moves the mouse, or when the
window loses keyboard focus.
Compiler, in release builds, complains about 'cell_count' "may be used
uninitialized". This isn't true, as it is initialized in every
possible switch case below.
But, make the compiler happy and zero-initialize it before the switch
statement.
When scrollback indicator has been enabled, and the viewport isn't at
the bottom, we now render a *static* indicator with the position in
percent.
We use the color scheme's blue color as background, and it's white
color as foreground. This is subject to change... Should maybe be
configurable as well.
The Wayland surface + sub-surface are instantiated on-demand, and
automatically destroyed when no longer used.
And turn it from a boolean to an enum. It can be set to:
* `none` - disables the indicator
* `static` - always rendered near the top of the window
* `moving` - position reflects the scrollback position