Commit graph

2704 commits

Author SHA1 Message Date
nerdopolis
fc25cfe93c two-step: Rename ScaleBackgroundWallpaper to ScaleBackgroundImage 2023-11-22 13:59:41 -05:00
nerdopolis
18af314509 two-step: Check for background.png before background-tile.png first, now that the background may not always be tiled 2023-11-22 13:59:36 -05:00
Ray Strode
5b5b133d5a Merge branch 'scaletwostepbackground' into 'main'
two-step: Support a ScaleBackgroundWallpaper to scale the background instead of tiling it

See merge request plymouth/plymouth!243
2023-11-22 15:23:05 +00:00
nerdopolis
ce869227f2 two-step: Support a ScaleBackgroundWallpaper to scale the background instead of tiling it 2023-11-21 22:20:12 -05:00
Ray Strode
4a6fcf0b52 Merge branch 'drm-guess-device-scale' into 'main'
drm: Guess device-scale when using simpledrm

See merge request plymouth/plymouth!242
2023-08-31 10:14:36 +00:00
Hans de Goede
01702de71a drm: Guess device-scale when using simpledrm
When displaying on a simpledrm kms device the physical dimensions
of the screen are unknown. Use the heuristics from ply_get_device_scale ()
to guess the device scale to avoid rendering things too small
on 4K screens.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-08-30 17:27:20 +02:00
Hans de Goede
f5eb3e57c2 drm: Add check if the driver used is simpledrm
Add a check to see if the driver used is simpledrm,
this is a preparation patch for adding support to set
device_scale based on heuristics when using simpledrm.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-08-30 17:27:20 +02:00
Hans de Goede
37b6cb958a drm: Initialize rotation local variable
Initialize rotation local variable to fix the following
false positive compiler warning:

src/plugins/renderers/drm/plugin.c: In function ‘get_primary_plane_rotation’:
src/plugins/renderers/drm/plugin.c:485:31: warning: ‘rotation’ may be used uninitialized [-Wmaybe-uninitialized]
  485 |                 *rotation_ret = rotation;
      |                 ~~~~~~~~~~~~~~^~~~~~~~~~
src/plugins/renderers/drm/plugin.c:419:18: note: ‘rotation’ was declared here
  419 |         uint64_t rotation;
      |                  ^~~~~~~~

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-08-30 17:27:20 +02:00
Hans de Goede
cfcd24976f utils: Add ply_guess_device_scale () helper
Add a ply_guess_device_scale () helper for getting device-scale
when the physical dimensions of the output are not available.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-08-30 17:27:20 +02:00
Ray Strode
b30f886b2e Merge branch 'drm-bgrt-scale-fix' into 'main'
drm: Use first output for panel info if there is no builtin display

See merge request plymouth/plymouth!241
2023-08-16 22:07:47 +00:00
Hans de Goede
22e25caaba two-step: Fix spelling of "different"
Fix "differtent" type, replacing it with "different".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-08-16 22:06:18 +00:00
Hans de Goede
e83abc08e4 drm: Use first output for panel info if there is no builtin display
The two-step renderer uses ply_renderer_get_panel_properties() to get
the device-scale used for the builtin panel, assuming this is most likely
light-up by the firmware on boot and that this is thus also displaying
the bgrt boot splash shown by the firmware at boot.

It needs to know the device-scale for this output so that if hi-dpi
(device-scale=2) rendering is used on the output it can also set
device-scale=2 on the ply_pixel_buffer() used for the bgrt background
so that the pixel-buffer code knows the splash is pre-scaled and
doesn't double it in size making it twice as big as original.

ATM this doubling in size of the splash is exactly what happens
when using a desktop with a hidpi monitor because the drm plugin
does not provide any "panel" properties in this case.

To avoid this fall-back to using the properties of the first
enumerated (connected) output for get_panel_properties().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-08-16 22:06:18 +00:00
Ray Strode
e70c0fb49e Merge branch 'i18n-fixes' into 'main'
Fix translations after meson conversion

See merge request plymouth/plymouth!240
2023-08-16 22:00:46 +00:00
Hans de Goede
c14e7857c9 i18n: Check for NL plymouth.mo file instead of /usr/share/locale existence
setlocale () does not work when there is no locale info for
the selected LANG / LC_MESSAGES. But it does cache the set
LANG / LC_MESSAGES and on subsequent setlocale () calls with
the same LANG / LC_MESSAGES it does not recheck for the locale info.

Thus if the initrd does not have translations then the setlocale ()
call should be delayed to after the chroot so that e.g.
the "Installing Updates..." text, which only is shown after
the chroot, gets translated properly.

So far we have been checking the /usr/share/locale dir exists,
but it is possible that some initrd generators may create
that without the necessary locale info being available.

Instead check for the NL plymouth.mo file, assuming that
if that is available we have all the necessary locale info.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-08-15 12:33:11 +02:00
Hans de Goede
c44a310575 i18n: Fix translations not working after meson conversion
After the meson conversion ENABLE_NLS and PACKAGE are no longer
defined.

The meson i18n module should ensure that dgettext() is always available,
so simply always use it to fix the translations not working.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-08-15 12:33:11 +02:00
Hans de Goede
79b725a1ba meson: Fix PLYMOUTH_LOCALE_DIRECTORY and PLYMOUTH_DRM_ESCROW_DIRECTORY defines
After the conversion to meson to following CFLAGS were passed:
-DPLYMOUTH_LOCALE_DIRECTORY="share/locale"
-DPLYMOUTH_DRM_ESCROW_DIRECTORY="libexec/plymouth"

Note the missing "/usr/" prefix.

Fix these so that the locale check and drm-escrow binary work
again.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-08-15 12:33:11 +02:00
Ray Strode
b1d5aa9d2a Merge branch 'fixuncrustify' into 'main'
label-freetype: Fix Uncrustify

See merge request plymouth/plymouth!239
2023-06-17 16:05:14 +00:00
nerdopolis
2bca0f5d0a label-freetype: Fix Uncrustify 2023-06-16 23:18:07 -04:00
Ray Strode
a5eda16568 Merge branch 'main' into 'main'
script: adds a new native GetCapslockState function to lib-plymouth

See merge request plymouth/plymouth!237
2023-06-05 17:23:50 +00:00
Tomás Pinho
3e6d59cbd9 script: adds a new native GetCapslockState function to lib-plymouth
Allows Plymouth Script-based themes to query the Capslock state
directly to act on it by showing an icon or message.
Takes in Ray's suggestions and base the implemention around the keyboard
type instead, delegating to the renderer/terminal renderer types instead.
2023-06-05 18:21:10 +01:00
Ray Strode
f6b37f2f7b Merge branch 'fixnumpadreturn' into 'main'
ply-input-device: Handle the "Enter" key on the numpad correctly.

See merge request plymouth/plymouth!236
2023-05-04 12:57:04 +00:00
nerdopolis
676f6c8d07 ply-input-device: Handle the "Enter" key on the numpad correctly. 2023-05-04 08:38:06 -04:00
Ray Strode
f09cfea7ce Merge branch 'tt-x11-periodically-handle-events' into 'main'
x11: periodically handle gtk events

Closes #190

See merge request plymouth/plymouth!230
2023-05-01 17:04:11 +00:00
Timo Teräs
261f305b50 x11: periodically handle gtk events
GTK main loop needs to be called periodically to handle
any idle and timer based events which do not trigger via fd.

fixes #190
2023-05-01 17:02:29 +00:00
Ray Strode
11b1180e3b Merge branch 'boot-log-option' into 'main'
Add new option to set boot log file

See merge request plymouth/plymouth!235
2023-04-29 15:36:16 +00:00
Balló György
5b266eb2f1 Add new option to set boot log file 2023-04-29 15:36:16 +00:00
Ray Strode
e8e193716f Merge branch 'tt-script-hotplug' into 'main'
script: handle display hotplug

Closes #186

See merge request plymouth/plymouth!232
2023-03-22 13:17:37 +00:00
Timo Teräs
1896ea7439 script: handle display hotplug
- Fix script plugin to handle monitor hotplug events

- Expose Plymouth.SetDisplayHotplugFunction to set script callback
  after display hotplug

fixes #186
2023-03-22 13:16:22 +00:00
Ray Strode
0a7aa26777 Merge branch 'tt-fixes' into 'main'
Various fixes to script plugin

See merge request plymouth/plymouth!231
2023-03-22 13:14:52 +00:00
Timo Teräs
167507880d script: fix deletion of sprites after full refresh
The node pointer is reused in the if (data->full_refresh) block
causing the following sprite list walking to fail. Fix this by
moving the sprite list first node getting next to the while loop
where it belongs.
2023-03-22 13:50:03 +02:00
Timo Teräs
51ee78ae1d script: fix script_lib_sprite_draw_area() if sprite_list is empty
The Sprite list may be empty under various conditions, cope with
this.
2023-03-22 13:49:41 +02:00
Timo Teräs
e0799eb77b script: fix reference leak in script_evaluate_set()
script_obj_hash_add_element() takes a new reference, so release
the reference returned by script_evaluate().
2023-03-22 13:49:33 +02:00
Timo Teräs
bfc91248b4 logger: snprintf needs #include <stdio.h> 2023-03-22 13:49:25 +02:00
Ray Strode
7302b49da8 Merge branch 'weblate-plymouth-master' into 'main'
Translations update from Fedora Weblate

See merge request plymouth/plymouth!229
2023-02-22 13:43:27 +00:00
mooo
f549528f2b Translated using Weblate (Lithuanian)
Currently translated at 100.0% (7 of 7 strings)

Co-authored-by: mooo <hazap@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/lt/
Translation: plymouth/main
2023-02-21 23:20:28 +01:00
Olga Smirnova
2a69e4d099 Translated using Weblate (Occidental)
Currently translated at 100.0% (7 of 7 strings)

Added translation using Weblate (Occidental)

Co-authored-by: Olga Smirnova <mistresssilvara@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/plymouth/master/ie/
Translation: plymouth/main
2023-02-21 23:20:28 +01:00
n3rdopolis
353276386f Merge branch 'removeunderscores' into 'main'
ply-device-manager: Change XKB_* variables from vconsole.conf to match systemd's

See merge request plymouth/plymouth!228
2023-01-24 21:11:46 +00:00
n3rdopolis
5ffd55e40b ply-device-manager: Change XKB_* variables from vconsole.conf to match systemd's 2023-01-24 12:53:29 -05:00
Ray Strode
c9dab67e61 Merge branch 'keep-it-on-the-dl' into 'main'
meson: Use dependency('dl') instead of cc.find_library('dl')

See merge request plymouth/plymouth!222
2023-01-02 17:35:08 +00:00
Ray Strode
6aefdea9d9 meson: Use dependency('dl') instead of cc.find_library('dl')
meson apparently has some built-in support for libdl, which
depending on libc implementations may or may not be in a separate
library from libc.

This commit changes meson.build to do things the "better" way.
2023-01-02 17:33:53 +00:00
Ray Strode
fcaa382d53 Merge branch 'plymouth-fixleds' into 'main'
ply-input-device: Don't skip setting LEDs on the device that a lock key was pressed on

See merge request plymouth/plymouth!227
2023-01-02 12:27:24 -05:00
n3rdopolis
42d414f9f7 ply-input-device: Ensure that the LED state is updated on the keyboard of which the lock key was pressed on
When a lock modifier is pressed, plymouth goes through some gymnastics
to ensure the LEDs on all attached keyboards are appropriately updated.

Unfortunately, an optimization in the code used to avoid redundant
updates of keyboards that already have the correct state is actually
preventing the initiating keyboard from getting its LEDs turned on.

This is because the initiating keyboard gets its state updated at
key press time before the LED handling code runs, thus making it
seem like that run is redundant.

This commit introduces a new state variable `leds_state_invalid`
on the input device to mark this situation and updates the optimization
check to also check the new variable.

Some contributions by Ray Strode.
2023-01-02 12:20:44 -05:00
Ray Strode
96d050ce96 Merge branch 'more-dynamic-exports-than-marco-polo' into 'main'
meson: Use export_dynmic: true instead of -rdynamic

See merge request plymouth/plymouth!223
2022-12-02 01:25:59 +00:00
Ray Strode
c5a234b5e3 meson: Use export_dynmic: true instead of -rdynamic
It seems like specifying -rdynamic in meson cflags doesn't work
on some systems, but meson has a built in way of doing the same
thing:

export_dynamic: true

This commit switches over to the probably more right way of
achieving a working dlopen(NULL).
2022-12-01 20:14:17 -05:00
Ray Strode
c81af06abd Merge branch 'built-ins-are-dynamic' into 'main'
meson: Build plymouthd with -rdynamic

See merge request plymouth/plymouth!219
2022-12-01 19:31:39 +00:00
Ray Strode
4a53499b95 meson: Build plymouthd with -rdynamic
plymouthd needs to be built with -rdynamic so that the builtin
"details" plugin is loadable.

This commit adds the flag.

Related to #200
2022-12-01 14:30:19 -05:00
Ray Strode
ee222f7fe8 Merge branch 'fix-input-crash' into 'main'
device-manager: Fix crash if XKB keymap could not be created

Closes #199

See merge request plymouth/plymouth!221
2022-12-01 19:26:02 +00:00
Ray Strode
31f6650d64 device-manager: Fix crash if XKB keymap could not be created
This commit fixes a crash introduced in the last commit when an
xkb keymap can't be created.

Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/199
2022-12-01 14:21:26 -05:00
Ray Strode
1c1c7e67f3 Merge branch 'uhh-actually-fix-tty-fallback' into 'main'
device-manager: Actually fall back to reading from tty if no xkb layout specified

Closes #199

See merge request plymouth/plymouth!220
2022-12-01 18:57:09 +00:00
Ray Strode
56a5e00b17 device-manager: Actually fall back to reading from tty if no xkb layout specified
Commit 7fcfcdf2d63025151a160f7948ee7406f0f16843 tried to fall back to
reading from a tty if no xkb layout was specified, but neglected to
actually check if no xkb layout was specified and force fall back to
reading from a tty in that case.

This commit changes device manager to actually disable reading from
/dev/input if the user doesn't specify a layout to use in vconsole.conf.

Closes https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/199
2022-12-01 13:40:30 -05:00