| Commit message (Collapse) | Author | Age | Lines |
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
Before this patch, fonts were anchored to the top of the line. With
this patch, it is instead centered.
Closes #1302
|
| | |\ |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
- wayland-instance template target was a mistake.
Systemd does not support simultaneous same user session, so stop
trying to go against that.
- Only start systemd units in Wayland environments.
|
| | |/
| |
| |
| |
| |
| | |
Even if WAYLAND_DISPLAY / XDG_RUNTIME_DIR are defined, if we can't
find the corresponding socket, we fallback to the path used when they
are not defined.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not insert existing positions into the tab stop list.
This prevents a performance issue when iterating through
an extremely long tab stop list.
Also corrects the behaviour of CBT.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The wayland protocol recommends (or mandates?) that compositors render
a black background behind fullscreened transparent windows. I.e. you
never see what’s _actually_ behind the window.
So, if you have a white, but semi-transparent background in foot,
it’ll be rendered in a shade of gray.
Given this, it’s better to simply disable transparency while we’re
fullscreened. That way, we at least get the "correct" background
color.
Closes #1416
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes a crash-on-exit on compositors that emit a _"keyboard
leave"_ event when a surface is unmapped.
In our case, destroying the window (where we unmap it) in
term_destroy(), lead to a crash in term_mouse_grabbed(), due to
key_binding_for() returning NULL.
The call chain in this is case is, roughly:
term_destroy() ->
wayl_win_destroy() ->
keyboard_leave() ->
term_xcursor_update_for_seat() ->
term_mouse_grabbed()
|
| | |
| |
| |
| |
| |
| |
| | |
This also updates the default theme in foot, as well as the
documentation.
Closes #1409
|
| | | |
|
| | |
| |
| |
| |
| | |
Before this, on compositor without cursor-shape support, a pointer
capability lost of the seat makes foot crash.
|
| | |\
| | |
| | |
| | | |
Closes #1404
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Break out the logic that updates the terminal’s scaling factor value,
from render_resize(), to a new function, term_update_scale(). This
allows us to update the scaling factor without a full grid resize.
We also change how we pick the scaling factor (when fractional scaling
is not in use). Before, we’d use the highest scaling factor from all
monitors we were mapped on. Now, we use the scaling factor from the
monitor we were *last* mapped on.
Then, add a boolean parameter to term_set_fonts(), and when
false, *don’t* call render_resize_force().
Also change term_font_dpi_changed() to only return true if the font
was changed in any way.
Finally, rewrite update_term_for_output_change() to:
* Call term_update_scale() before doing anything else
* Call render_resize{,_force} *last*, and *only* if either the scale
or the fonts were updated.
This fixes several things:
* A bug where we failed to update the fonts when fractional scaling
was in use, and we guessed the initial scale/DPI wrong. The bug
happened because updated the internal "preferred" scale value, and a
later call to render_resize() updated the terminal’s scale value,
but since that code path didn’t call term_font_dpi_changed() (and it
shouldn’t), the fonts weren’t resized properly.
* It ensures we only resize the grid *once* when the scaling factor,
or DPI is changed. Before this, we’d resize it twice. And this
happened when e.g. dragging the window between monitors.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With legacy scaling, we need to use a "scaled", or "logical" DPI
value, that is basically the real DPI value scaled by the monitor’s
scaling factor.
This is necessary to compensate for the compositor downscaling the
surface, for "fake" fractional scaling.
But with true fractional scaling, *we* scale the surface to the final
size. This means we should *not* use the scaled DPI, but the monitor’s
actual DPI.
To facilitate this, store both the scaled and the unscaled DPI value
in the monitor struct.
This patch also changes how we pick the DPI value. Before, we would
use the highest DPI value from all the monitors we were mapped
on. Now, we use the DPI value from the monitor we were *last* mapped
on (typically the window we’re dragging the window *to*).
|
| | | |
| | |
| | |
| | | |
Also, drop wl_window::have_preferred_scale. Check for scale > 0 instead.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This should fix an issue where the font size wasn’t updated when
moving the window between outputs whose scaling factors match when
truncated.
|
| | |/ |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
This worked just after the fractional-scaling branch was merged, but
was then broken by the cursor-shape branch, due to a bad rebase of
that branch.
|
| | | |
|
| | |
| |
| |
| |
| | |
If we truncate the buffer dimensions we may accidentally submit a
buffer with inappropriate size.
|
| | | |
|
| | |\
| |/
|/| |
|
| | | |
|
| |/ |
|
| |
|
|
|
|
|
|
|
| |
When enabled, double-clicking the CSD titlebar will (un)maximize the
window.
Defaults to ‘yes’ (since this is the old hard-coded behavior).
Closes #1293
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Not all themes have/define custom cursor colors. But of those that do,
nearly all already enabled them (by setting "cursor.color"), except
three themes:
* aeroroot
* ayu-mirage
* material-amber
This patch makes all themes consistent, by enabling cursor.color in
these last three themes too.
|
| |
|
|
| |
Closes #1321
|
| | |
|
| | |
|
| |
|
|
| |
Closes #1321
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When the user has configured custom cursor colors (cursor.color is set
in foot.ini), don’t invert those colors when the cell is either
selected, or has the ‘reverse’ attribute set.
This aligns foot’s behavior with Alacritty, Kitty and Wezterm. Contour
also behaves similarly, except mouse selections override the cursor
colors (turning the cursor invisible).
Closes #1347
|
| |
|
|
|
| |
Default cursor color is "inversed fg/bg", and themes aren’t supposed
to change that.
|
| | |
|
| |
|
|
|
| |
Default cursor color is "inversed fg/bg", and themes aren’t supposed
to change that.
|
| | |
|
| | |
|
| |\
| |
| |
| | |
Closes #1183
|
| | |
| |
| |
| |
| | |
It “fixes” the key binding conflict seen on e.g. GNOME, and increases
the exposure of the change to, hopefully, more users.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having a keybinding to invoke arbitrary unicode characters is very
useful. It's often used as a method of last resort to communicate with
people outside of your main language. For example, if you want to type
the last letter of my real name, you can invoke the latin-1 character
0xe9 or unicode 0x00e9.
You can also use this to type special characters, for example, unicode
U+1F4A9 is of course, the infamous PILE OF POO, which is sure to
produce million laughs everywhere you go.
In foot, there's no keybinding by default to invoke the very useful
unicode-input command. There is no "standard" (as in "ISO") keybinding
this either. But there *is* a de-facto standard currently deployed
by *both* GTK and Qt (a rare feat) *and* Chrome OS (an even rarer
feat) and it's control-shift-u.
Alternatives include Control-x 8 (emacs), Control V u (vim),
Alt (Windows, LibreOffice), or Option (Mac). I doubt we want to adopt
any of those.
So let's use control-shift-u for this. Unfortunately, it's currently
assigned to show-urls-launch, which is unfortunate, but
insurmountable. We can reassign this keybinding elsewhere. I have
picked control-shift-o in my configuration, because "o" is a good
mnemonic for "open URLs". Others have suggested "m" instead.
Closes: #1183
|
| |
|
|
| |
Closes #517
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
When using muon[1] instead of meson, this was causing the following
error:
$ muon setup bld
.../meson_options.txt:26:124: error unterminated hex escape
.../meson_options.txt:26:223: error unterminated string
[1]: https://muon.build/
|
| |\
| |
| |
| | |
Closes #1379
|
| | |
| |
| |
| |
| | |
This should fix a build issue when doing partial PGO builds, when
cursor-shape-v1 is *available*.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When compiling *without* cursor-shape-v1 support,
term_xcursor_update_for_seat() would incorrectly set
shape=CURSOR_SHAPE_CUSTOM, even though no custom cursor had been set
by the user.
This resulted in a crash in render_xcursor_set(), when trying to use a
NULL-string as custom cursor.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using a lookup table, try to map the user-provided xcursor string to a
cursor-shape-v1 known shape.
If we succeed, set the user’s custom cursor using server side
cursors (i.e. using cursor-shape-v1).
If not, fallback to trying to load the image ourselves (using
wl_cursor_theme_get_cursor()), and set it using the legacy
wl_pointer_set_cursor().
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This patch assumes a git snapshot of wayland-protocols are
installed.
We need to bump the version number as soon as the next version of
wayland-protocols have been released.
|
| | |
| |
| |
| |
| | |
Well, we _could_, but we’d have to reverse map the string to a
cursor-shape-v1 enum value. Let’s not do that, for now at least.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This implements support for the new cursor-shape-v1 protocol. When
available, we use it, instead of client-side cursor surfaces, to
select the xcursor shape.
Note that we still need to keep client side pointers, for:
* backward compatibility
* to be able to "hide" the cursor
Closes #1379
|
| |/ |
|
| |
|
|
| |
Added in wayland-protocols-1.32
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch, when the cell dimensions changed (i.e. when the
font size changes), sixel images were either removed (the new cell
dimensions are smaller than the old), or simply kept at their original
size (new cell dimensions are larger).
With this patch, sixels are instead resized. This means a
sixel *always* occupies the same number of rows and columns,
regardless of how much the font size is changed.
This is done by maintaining two sets of image data and pixman images,
as well as their dimensions. These two sets are the new ‘original’ and
‘scaled’ members of the sixel struct.
The "top-level" pixman image pointer, and the ‘width’ and ‘height’
members either point to the "original", or the "scaled" version.
They are invalidated as soon as the cell dimensions change. They, and
the ‘scaled’ image is updated on-demand (when we need to render a
sixel).
Note that the ‘scaled’ image is always NULL when the current cell
dimensions matches the ones used when emitting the sixel (to save
run-time memory).
Closes #1383
|
| | |
|
| |
|
|
| |
Closes #1392
|
| |\
| |
| |
| | |
Closes #1385
|
| | |
| |
| |
| | |
This generates both smaller, and faster code
|
| | |
| |
| |
| |
| | |
P2=1 means "empty sixels remain at their current color". This is
usually the case with modern sixel encoders.
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Images with an aspect ratio of 1:1 are by far the most common (though
not the default).
It makes a lot of sense, performance wise, to special case
them.
Specifically, the sixel_add() function benefits greatly from this, as
it is the inner most, most heavily executed function when parsing a
sixel image.
sixel_add_many() also benefits, since allows us to drop a
multiplication. Since sixel_add_many() always called first (no other
call sites call sixel_add() directly), this has a noticeable effect on
performance.
Another thing that helps (though not as much), and not specifically
with AR 1:1 images, is special casing DECGRI a bit.
Up until now, it simply updated the current sixel parameter value. The
problem is that the default parameter value is 0. But, a value of 0
should be treated as 1. By adding a special ‘repeat_count’ variable to
the sixel struct, we can initialize it to ‘1’ when we see DECGRI, and
then simply overwrite it as the parameter value gets updated. This
allows us to drop an if..else when emitting the sixel.
|
| |\ |
|
| | |
| |
| |
| |
| | |
Since the first frame uses legacy scaling, the surface may have a
buffer scale > 1, which isn’t allowed.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This way, the initial frame is more likely to get scaled correctly;
foot will guess the initial (integer) scale from the available
monitors, and use that. By using legacy scaling, we force the
compositor to down-scale the image to the correct scale factor.
If we use the new fraction scaling method with an integer scaling
factor, the initial frame gets rendered way too big.
|
| | | |
|
| | |
| |
| |
| |
| | |
When doing legacy scaling (non-fractional scaling), assert the
surface’s width and height are multiples of the (integer) scale.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We now default to scaling fonts using the scaling factor, not monitor
DPI.
The ‘auto’ value for dpi-aware has been removed.
Documentation (man pages and README) have been updated to reflect the
new default.
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
When the window’s preferred scaling factor is changed (through the
fractional-scaling protocol), update the terminal; resize font, resize
sub-surfaces etc.
|
| | |
| |
| |
| | |
This is done by setting the surface’s viewport destination
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
This will be needed later, when using fractional scaling + viewporter
to scale.
|