Commit graph

2872 commits

Author SHA1 Message Date
Ray Strode
2dba038dd7 Merge branch 'weblate-plymouth-master' into 'main'
Translations update from Fedora Weblate

See merge request plymouth/plymouth!234
2024-01-04 09:25:55 +00:00
Diogyn D
e40db1f181 Translated using Weblate (Welsh)
Currently translated at 100.0% (7 of 7 strings)

Added translation using Weblate (Welsh)

Co-authored-by: Diogyn D <diogyn@tutanota.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/cy/
Translation: plymouth/main
2024-01-04 04:56:03 +01:00
Fran Diéguez
507918201d Translated using Weblate (Galician)
Currently translated at 100.0% (7 of 7 strings)

Added translation using Weblate (Galician)

Co-authored-by: Fran Diéguez <frandieguez@gnome.org>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/gl/
Translation: plymouth/main
2024-01-04 04:56:03 +01:00
Philip Goto
40503a0dc0 Translated using Weblate (Dutch)
Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Philip Goto <philip.goto@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/nl/
Translation: plymouth/main
2024-01-04 04:56:03 +01:00
Pavel Borecki
8a9c87e47b Translated using Weblate (Czech)
Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: Pavel Borecki <pavel.borecki@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/cs/
Translation: plymouth/main
2024-01-04 04:56:03 +01:00
Ray Strode
65dbf4ecc7 Merge branch 'fix-freetype-loading-bug' into 'main'
label-freetype: Rework font loading

See merge request plymouth/plymouth!296
2024-01-03 21:24:44 +00:00
Ray Strode
544e62ac41 label-freetype: Rework font loading
There's currently this function, set_font_with_fallback, that
almost always gets called with a NULL first argument in the
initramfs, forcing the _with_fallback part of the function to
run.

It's a little strange to have a function with a chunk of code that
hardly ever runs. Furthermore there's a bug where the error variable
is left uninitialized in this case leading to the freetype plugin
sporadically failing to load the fallback font.

This commit reworks things to drop set_font_with_fallback, and just
call FT_New_Face directly in the caller. Fallbacks are handled
at the point where the font path is determined
(previously called query_fc_match, now called find_default_font_path.
2024-01-03 15:45:01 -05:00
Ray Strode
68b6fd28f1 Merge branch 'fix-pango-hex-box-removal' into 'main'
label-pango: Try to fix up remove_hexboxes_from_pango_layout

See merge request plymouth/plymouth!295
2024-01-03 16:29:51 +00:00
Ray Strode
38e96ef944 label-pango: Try to fix up remove_hexboxes_from_pango_layout
There are a few issues with the remove_hexboxes_from_pango_layout
function, where it's getting offsets wrong and things like that.

This commit changes the approach entirely. Rather than modifying
the text to remove characters without font converage, it just
changes out the glyphs for those characters to be white boxes.
2024-01-03 11:13:31 -05:00
Ray Strode
83486f89c1 ply-utils: Make ply_utf8_character_get_byte_type detect invalid bytes
Somehow I neglected to make ply_utf8_character_get_byte_type
differentiate between valid and invalid utf-8.

This commit fixes that.
2024-01-03 11:13:31 -05:00
Ray Strode
38964e5eaf Merge branch 'dont-set-keyboard-mode-so-much' into 'main'
ply-terminal: Only set keyboard mode when changing it

See merge request plymouth/plymouth!294
2024-01-03 00:56:21 +00:00
Ray Strode
6e411c7dcb ply-terminal: Only set keyboard mode when changing it
Setting the console keyboard mode is not entirely idempotent.
The kernel may flush the input buffer leading to lost
key strokes. We currently set the mode explicitly on graphics
updates as part of our more general "fix things up in case
something during boot screws with the terminal settings" code.

That leads to keystrokes getting eaten.

This commit makes the terminal more careful about setting the
keyboard mode. It now only changes it when plymouth thinks its
necessary to do so.

In the future we could query the keyboard mode and reset it
when it's wrong, but I think we should hold off on doing that
until shown we need to.
2024-01-03 00:56:10 +00:00
Ray Strode
c6fc3b189c Merge branch 'more-keyboard-debugging' into 'main'
ply-keyboard: Add a little mode debug logging

See merge request plymouth/plymouth!293
2024-01-02 03:24:26 +00:00
Ray Strode
e7914b0ccd ply-keyboard: Add a little mode debug logging
It seems like the terminal fd is getting read from multiple
consumers, so add a little more logging to see if it's happening
in the keyboard code.
2024-01-01 22:18:28 -05:00
Ray Strode
f0c43d1148 Merge branch 'debug-key-events' into 'main'
ply-keyboard: Add new plymouth.debug-key-events option

See merge request plymouth/plymouth!292
2024-01-01 21:23:06 +00:00
Ray Strode
fbb545b2d1 ply-keyboard: Add new plymouth.debug-key-events option
We're currently facing a bug where keys have to be hit several
times to register for a user.

In order to make traction on that problem, this commit adds a
new plymouth.debug-key-events kernel command line option
to report in more detail the keyboard events coming in from the
terminal.
2024-01-01 16:21:58 -05:00
Ray Strode
66162119e1 Merge branch 'rework-renderer-terminal-input-handling' into 'main'
renderers: Rework input handling a little

See merge request plymouth/plymouth!291
2023-12-30 16:19:57 +00:00
Ray Strode
3d0705f50f renderers: Rework input handling a little
We don't need to flush the terminal input buffer on key events from
the renderers, because the terminal does that itself.

Also, we should disable the terminal input when a /dev/input
device is added instead of relying on it happening the next flush
period.

Finally, we should make sure the terminal gets reenabled on close,
just so we clean up after ourselves.
2023-12-30 09:55:33 -05:00
Ray Strode
0230804282 Merge branch 'add-terminal-logging' into 'main'
ply-terminal: Log when terminal input gets enabled/disabled

See merge request plymouth/plymouth!290
2023-12-30 14:05:15 +00:00
Ray Strode
fa38ccda61 ply-terminal: Log when terminal input gets enabled/disabled
We're currently seeing a bug where it seems like the terminal might
be getting intermittently disabled.

This commit adds some logging to confirm or rule out that possibility.
2023-12-30 14:05:08 +00:00
Ray Strode
35c86e41bb Merge branch 'initialize-line-dimensions' into 'main'
label-freetype: Initialize line dimensions to 0

See merge request plymouth/plymouth!289
2023-12-29 14:31:35 +00:00
Ray Strode
69c821494a label-freetype: Initialize line dimensions to 0
Now that we can print the line dimensions, we should
initialize them to zero.
2023-12-29 09:16:59 -05:00
Ray Strode
84c2ca7c7f Merge branch 'debug-escape-sequences' into 'main'
ply-terminal-emulator: Add way to see escape sequences

See merge request plymouth/plymouth!288
2023-12-29 01:22:54 +00:00
Ray Strode
bdcf5256fb ply-terminal-emulator: Add way to see escape sequences
This commit adds a new kernel command line option
plymouth.debug-escape-sequences that makes escape sequences stay
unparsed and instead get printed on the screen.
2023-12-28 20:22:39 -05:00
Ray Strode
41cf8643d6 Merge branch 'show-label-dimensions' into 'main'
label: Put dimensions of text in log

See merge request plymouth/plymouth!287
2023-12-29 01:21:50 +00:00
Ray Strode
2fd53a40f2 label: Put dimensions of text in log
This just helps with debugging.
2023-12-28 20:21:20 -05:00
Ray Strode
9b68260a75 Merge branch 'measure-hidden-freetype-labels' into 'main'
label-freetype: Measure control even if hidden

See merge request plymouth/plymouth!286
2023-12-28 19:08:24 +00:00
Ray Strode
bacce720ee label-freetype: Measure control even if hidden
Sometimes we want to query the size of hidden labels too, so
it's important we still compute the size, even if hidden.
2023-12-28 19:07:49 +00:00
Ray Strode
3b5dce92d4 Revert "ply-utils: Use lstat instead of stat for ply_file_exists"
This reverts commit e989867f48.

I had stat/lstat momentarily crossed in my brain
2023-12-28 14:05:36 -05:00
Ray Strode
ed3e4c8a11 Merge branch 'freetype-metrics-fix' into 'main'
label-freetype: Ensure font metrics are up to date when querying dimensions

See merge request plymouth/plymouth!285
2023-12-28 18:44:18 +00:00
Ray Strode
97516094e4 label-freetype: Ensure font metrics are up to date when querying dimensions
If code calls ply_label_get_width without ply_label_show or some other
call that forces the dimensions to be computed first, then the returned
width will be wrong.

This commit makes the freetype plugin look more like the pango plugin
where the size will computed on demand when querying the width, if
necessary.
2023-12-28 13:39:19 -05:00
Ray Strode
a44ffaf8ed Merge branch 'freetype-font-debugging' into 'main'
Improve font loading error debug messages in freetype plugin

See merge request plymouth/plymouth!284
2023-12-28 17:32:15 +00:00
Ray Strode
8cd615f188 label-freetype: Log font loading error
Right now if there's an error loading a font we quietly just
proceed.

This commit adds a debug log message saying what the error is.
2023-12-28 17:31:48 +00:00
Ray Strode
d8fd8e222c label-freetype: Don't bother loading fallback font if it doesn't exist
If the fallback font doesn't exist, we shouldn't even try to load it,
there's no point.

Instead, put a nice error in the log.
2023-12-28 17:31:48 +00:00
Ray Strode
e989867f48 ply-utils: Use lstat instead of stat for ply_file_exists
If a file is a symlink, we usually want to follow it, so
testing the symlink itself, is less than optimal.

This commit switches to lstat instead of stat.
2023-12-28 17:31:48 +00:00
Ray Strode
746078e89d Merge branch 'pango-console-viewer-fixes' into 'main'
console viewer fixes with the pango label plugin

See merge request plymouth/plymouth!283
2023-12-28 16:54:10 +00:00
Ray Strode
d4759a7766 ply-console-viewer: Make free function NULL safe 2023-12-28 11:51:09 -05:00
Ray Strode
b06435001b label-pango: Pass explicit width when computing height
pango will give a height that's several orders of magnitude too
big sometimes when the width is -1.

This commit checks for -1, explicitly measures the width first, and
remeasures with that width passed in to compute the height.
2023-12-28 11:45:43 -05:00
Ray Strode
d0f90388da ply-console-viewer: Disallow zero lines
A logic error meant the console viewer can end up being zero lines.

This commit fixes that.
2023-12-28 11:35:10 -05:00
Ray Strode
1b6c4b8684 label-pango: Fix inverted conditional
Right now we skip sizing the control when force == true because
of an inverted conditional.

This commit fixes that.
2023-12-28 10:53:02 -05:00
Ray Strode
07992537e8 ply-console-viewer: Fix typo
The last commit had a typo where it would never prefer console viewer.

This commit fixes that.
2023-12-28 10:03:05 -05:00
Ray Strode
8479450804 Merge branch 'console-viewer-crasher-fix' into 'main'
ply-console-viewer: Handle fonts failing to load better

See merge request plymouth/plymouth!282
2023-12-28 15:01:18 +00:00
Ray Strode
1a3251c43f two-step: Be more tolerant when there's no console viewer
There are still a number of places in the code where a console
viewer is expected, when it's totally possible that there won't
be one.

This commit runs through them, and does a few other style
cleanups on the way.
2023-12-28 09:36:06 -05:00
Ray Strode
0c62d4a0cf space-flares: Be more tolerant when there's no console viewer
There are still a number of places in the code where a console
viewer is expected, when it's totally possible that there won't
be one.

This commit runs through them, and does a few other style
cleanups on the way.
2023-12-28 09:36:06 -05:00
Ray Strode
6359b6715e fade-throbber: Be more tolerant when there's no console viewer
There are still a number of places in the code where a console
viewer is expected, when it's totally possible that there won't
be one.

This commit runs through them, and does a few other style
cleanups on the way.
2023-12-28 09:31:08 -05:00
Ray Strode
f281978ce8 ply-console-viewer: Handle fonts failing to load better
Right now we divide by zero if the font metrics can't be determined
and tank.

This commit attempts to detect the situation and fall back to using
kernel fb console in that case.
2023-12-28 08:59:25 -05:00
Ray Strode
197d580383 Merge branch 'catch-sigfpe' into 'main'
main: Catch floating point exceptions in crasher handler too

See merge request plymouth/plymouth!281
2023-12-28 13:05:22 +00:00
Ray Strode
9d8c62af24 main: Catch floating point exceptions in crasher handler too
Right now we catch the two big types of crashes:

1. Segmentation fault
2. Assertion failure

But we don't catch another common type, "Divide by zero"

This commit fixes that.
2023-12-28 07:48:43 -05:00
Ray Strode
aed498e026 Merge branch 'fix-xkb-crash' into 'main'
ply-device-manager: Handle XKB failing to load more gracefully

See merge request plymouth/plymouth!280
2023-12-27 22:02:36 +00:00
Ray Strode
5b471eb7e3 ply-device-manager: Handle XKB failing to load more gracefully
Right now we always assume `xkb_context_new` will succeed.

This isn't necessarily true. If it fails, we shouldn't crash.

This commit fixes that.
2023-12-27 21:39:33 +00:00