From cdd49aac43e5e62d7d7ce15853cc9d0574a0a34f Mon Sep 17 00:00:00 2001 From: Charlie Brej Date: Mon, 9 Mar 2009 14:51:08 +0000 Subject: [PATCH] Fix password entry dialogue in fade-in plugin. Previously ply-entry was crashing with an assertion "entry->loop == NULL" whenever the entry was updated. The change is basicly a copy of the working version from spinfinity. --- src/plugins/splash/fade-in/bullet.png | Bin 745 -> 296 bytes src/plugins/splash/fade-in/plugin.c | 37 ++++++++++++++++++-------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/plugins/splash/fade-in/bullet.png b/src/plugins/splash/fade-in/bullet.png index 691fb8033bf2c9747ff7b33e0b21e0709f74905c..dd5273699d4b90ceff838790aac2b35aa90d2298 100644 GIT binary patch delta 208 zc-ni(x`IiuGr-TCmrII^fq{Y7)59eQNV9`52OE$)5)^)UqM|*AI4^_LA>Dm*CuXSE zGc++sgeK8}lCiV$eG9{5EH_Eb9du7O4cjJH<7OVuJF)h0l)713Hqy)78&q Iol`;+0HWqf>Hq)$ delta 660 zc-jG!0&D%K0_g=IiBL{Q4GJ0x0000DNk~Le0000q0000q2nGNE0L6G4>yaTp2o?i1 z7Tbt=Z;@yxe*#2FL_t(&-tC&dPQx$|hd+`fY#zHcBU|$ZWaJUp=*HtPGofyFmAY#)qxrS-@q%d*!4gTJaj0{Hu;0Zx>cbR zxR8A&f1%r^M4kDzJ!;(2UQ=g}8ruMoqt2AZ_#&3XzJpdXSAm!^}6bGPCfOOzce+;H5n3hJUriJ0J%IO{ee`yzJ7HHZPSUsi4`tT)Cm9)fOxEt$C zJTzO0J90>$0#oT<%<-ChG|i?YfVFcA-0fQXIXyZGHsr^mlIn1(O@JxRVf{Lw1i=eIs|hMT(fMYRJLBVB)bGv8m7!Wg%9(`k7egfwNL*ZM%|D^1ii7WoVtAH&UR?Ajpx~`h}05Tentry)) + { + draw_background (plugin, NULL); - ply_frame_buffer_get_size (plugin->frame_buffer, &area); - lock_width = ply_image_get_width (plugin->lock_image); - lock_height = ply_image_get_height (plugin->lock_image); + ply_frame_buffer_get_size (plugin->frame_buffer, &area); + + entry_width = ply_entry_get_width (plugin->entry); + entry_height = ply_entry_get_height (plugin->entry); - entry_width = ply_entry_get_width (plugin->entry); - entry_height = ply_entry_get_height (plugin->entry); + lock_area.width = ply_image_get_width (plugin->lock_image); + lock_area.height = ply_image_get_height (plugin->lock_image); + lock_area.x = area.width / 2.0 - (lock_area.width + entry_width) / 2.0; + lock_area.y = area.height / 2.0 - lock_area.height / 2.0; - x = area.width / 2.0 - (lock_width + entry_width) / 2.0 + lock_width; - y = area.height / 2.0 - entry_height / 2.0; + x = area.width / 2.0 - (lock_area.width + entry_width) / 2.0 + lock_area.width; + y = area.height / 2.0 - entry_height / 2.0; - ply_entry_show (plugin->entry, plugin->loop, plugin->window, x, y); + ply_entry_show (plugin->entry, plugin->loop, plugin->window, x, y); + + lock_data = ply_image_get_data (plugin->lock_image); + ply_frame_buffer_fill_with_argb32_data (plugin->frame_buffer, + &lock_area, 0, 0, + lock_data); + } + else + { + ply_entry_draw (plugin->entry); + } } void display_normal (ply_boot_splash_plugin_t *plugin) @@ -684,7 +700,6 @@ display_question (ply_boot_splash_plugin_t *plugin, if (plugin->state == PLY_BOOT_SPLASH_DISPLAY_NORMAL) { stop_animation (plugin); - show_password_entry (plugin); } plugin->state = PLY_BOOT_SPLASH_DISPLAY_QUESTION_ENTRY; -- 2.47.3