45 lines
1.7 KiB
Diff
45 lines
1.7 KiB
Diff
|
From c9b084882bb26a339acb06aa96f748c8f6b465e4 Mon Sep 17 00:00:00 2001
|
||
|
From: Hans de Goede <hdegoede@redhat.com>
|
||
|
Date: Tue, 18 Feb 2020 11:50:17 +0100
|
||
|
Subject: [PATCH 2/7] ply-keymap-icon: Do not draw on free
|
||
|
|
||
|
One case where the various widgets are being freed is the pixel-display-s
|
||
|
being removed because of a monitor being hot(un)plugged. When the monitor
|
||
|
configuration changes ply-device-manager removes all old pixel-displays
|
||
|
and then adds the pixel-displays from the new config.
|
||
|
|
||
|
Calling ply_pixel_display_draw_area on a pixel-display which is about to be
|
||
|
freed is a bad idea, if the monitor was actually unplugged this leads to
|
||
|
various sort of errors, including crashes in some cases.
|
||
|
|
||
|
ply-keymap-icon is a recently added widget, none of the other
|
||
|
(older) widgets redraw themselves as hidden on free because there is
|
||
|
no reason to do this.
|
||
|
|
||
|
This commit removes the troublesome hide call (which involves redrawing).
|
||
|
This fixes plymouth sometimes crashing when monitors are hot(un)plugged
|
||
|
while plymouth is running.
|
||
|
|
||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||
|
---
|
||
|
src/libply-splash-graphics/ply-keymap-icon.c | 3 ---
|
||
|
1 file changed, 3 deletions(-)
|
||
|
|
||
|
diff --git a/src/libply-splash-graphics/ply-keymap-icon.c b/src/libply-splash-graphics/ply-keymap-icon.c
|
||
|
index f9ec614..d537527 100644
|
||
|
--- a/src/libply-splash-graphics/ply-keymap-icon.c
|
||
|
+++ b/src/libply-splash-graphics/ply-keymap-icon.c
|
||
|
@@ -130,9 +130,6 @@ ply_keymap_icon_free (ply_keymap_icon_t *keymap_icon)
|
||
|
if (keymap_icon == NULL)
|
||
|
return;
|
||
|
|
||
|
- if (!keymap_icon->is_hidden)
|
||
|
- ply_keymap_icon_hide (keymap_icon);
|
||
|
-
|
||
|
ply_pixel_buffer_free (keymap_icon->icon_buffer);
|
||
|
ply_pixel_buffer_free (keymap_icon->keymap_buffer);
|
||
|
|
||
|
--
|
||
|
2.25.1
|
||
|
|