Commit graph

2888 commits

Author SHA1 Message Date
Ray Strode
02bd04d431 Merge branch 'fix245' into 'main'
renderers: Do not assume all keyboards have LEDs

Closes #245

See merge request plymouth/plymouth!304
2024-01-31 16:14:08 +00:00
n3rdopolis
709f21e801 renderers: Do not assume all keyboards have LEDs
This is an attempt to fix #245
2024-01-31 08:38:38 -05:00
Ray Strode
07662e5488 Merge branch 'fix-freetype-fallback' into 'main'
label-freetype: fix fallback not working when fc-match isn't available

Closes #239

See merge request plymouth/plymouth!302
2024-01-16 02:06:59 +00:00
Ferdinand Bachmann
792fe7474a label-freetype: fix fallback not working when fc-match isn't available
The new font loading functions introduced in
544e62ac41 assume that popen() returns
NULL when fc-match is unavailable or fails. This is incorrect, since
popen() will always start a shell to run the passed command and return a
stream to that shell's stdin and stdout.

This results in an non-null but empty font name being passed to
FT_New_Face(), which fails.

This commit fixes this by also using the fallback font when the font
path read from the popen() stream is empty.

Fixes #239
Fixes regression caused by 544e62ac41
2024-01-16 02:13:40 +01:00
n3rdopolis
18590a2159 Merge branch 'inibash' into 'main'
plymouth-set-default-theme: Use a more targeted bash ini-parser function...

Closes #238

See merge request plymouth/plymouth!300
2024-01-13 00:33:26 +00:00
nerdopolis
6d5d3044fe plymouth-set-default-theme: Use a more targeted bash ini-parser function instead of sed to handle the config file 2024-01-13 00:31:19 +00:00
Ray Strode
cc15da222d Merge branch 'fixinigroup' into 'main'
splash plugins: Fix wrong group being used for console viewer settings in...

See merge request plymouth/plymouth!301
2024-01-10 19:46:10 +00:00
nerdopolis
0c4b27e06f splash plugins: Fix wrong group being used for console viewer settings in space-flares and fade-throbber 2024-01-10 07:20:02 -05:00
Ray Strode
0416745438 Merge branch 'fixinputwarnings' into 'main'
ply-input-device: Fix 'may be used uninitialized' warnings

See merge request plymouth/plymouth!299
2024-01-05 15:42:39 +00:00
n3rdopolis
5878235e7d ply-input-device: Fix 'may be used uninitialized' warnings
If libevdev gave plymouth an event with an out of range key event type then plymouth would end up using uninitialized variables.

This commit fixes the compiler warning introduced from that unlikely scenario.
2024-01-05 15:42:39 +00:00
Ray Strode
226c573c39 Merge branch 'fixvtlesscrash' into 'main'
ply-terminal: Fix crash on vt-less kernels when checking the enabled state

See merge request plymouth/plymouth!298
2024-01-05 10:20:26 +00:00
nerdopolis
5c10072a97 renderers: Only call ply_terminal_set_unbuffered_input when there is a terminal 2024-01-04 21:42:28 -05:00
nerdopolis
63597f92d1 ply-terminal: Fix crash on vt-less kernels when checking the enabled state 2024-01-04 21:06:50 -05:00
Ray Strode
d6e6366d62 Merge branch 'fix-hidpi-on-freetype' into 'main'
label-freetype: Fix rowstride bug with hidpi displays

See merge request plymouth/plymouth!297
2024-01-04 21:08:14 +00:00
Ray Strode
345d28b3cb label-freetype: Force resize calculation when moving control
When moving the label around we need to do a full recalculation
of the metrics, because the position is part of the computation.
2024-01-04 16:07:06 -05:00
Ray Strode
1c2c9e622d label-freetype: Fix rowstride bug with hidpi displays
The freetype plugin correctly doubles the DPI on hidpi displays,
but fails to account for the doubled pixels in display's pixel buffer.

This commit adds a factor of 2 to the size and positioncomputations,
to hopefully fix a row stride and a positioning bug.
2024-01-04 15:28:02 -05:00
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