[Splashy-devel] Bug#473230: How is this supposed to work?
John Hughes
john at Calva.COM
Fri Apr 4 14:47:04 UTC 2008
In keyevent_loop we have:
1077 else if (key == DIKS_F2)
1078 {
1079 /*
1080 * when F2 is pressed we display a
1081 * small theme-defined surface where
1082 * text scrolls showing the currect
1083 * /dev/vcs[1,2,3,4,5,6,7] text
1084 * @see verbose_text_loop
1085 */
1086 if (F2_toggle_pressed != TRUE)
1087 {
1088 F2_toggle_pressed = TRUE;
1089 splashy_set_textbox_area_visible(TRUE);
And in splashy_set_textbox_area_visible:
139 void
140 splashy_set_textbox_area_visible (int visible)
141 {
142 _show_textbox_area = visible;
143 /*
144 * users expect to see something happen as soon
145 * as F2 is pressed. Let's give'm a show for their
146 * money!
147 */
148 if (visible)
149 {
150 video.textbox->offscreen->Blit (video.textbox->surface,
151 video.textbox->offscreen,
152 NULL, 0, 0);
But when we get to line 148 above
Breakpoint 1, splashy_set_textbox_area_visible (visible=1)
at splashy_video.c:148
148 if (visible)
(gdb) p visible
$1 = 1
(gdb) p video.textbox
$2 = (splashy_box_t *) 0x0
(gdb)
BANG!
Looking at splashy_video.c we see that textbox gets initialised in
start_text_area, but only if /splashy/textbox/enable is "yes", and in
most themes it is set to "no".
Seems like the themes think "textbox/enable" sets the default visibility
but the code thinks it means whether it exists or not.
In any case splashy_set_text_area_visible shouldn't be using
video.textbox if it hasn't been initialised.
What is *supposed* to be happening?
More information about the Splashy-devel
mailing list