[Splashy-devel] Bug#473230: Bug#473230: How is this supposed to work?
Luis Mondesi
lemsx1 at gmail.com
Wed Apr 16 04:31:22 UTC 2008
On Fri, Apr 4, 2008 at 10:47 AM, John Hughes <john at calva.com> wrote:
> 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?
>
Legacy stuff that needs to be taken out.
Before we used to read /dev/vcs* to know if one of a list of keywords was
detected. "error", "fail", etc... Whenever we saw one of those, we would
trigger "verbose" mode automatically and show the errors to the users as
they scrolled through the TTY (as read from the buffer console /dev/vcsNN).
This is a nightmare. The way /dev/vcs* is formatted is weird, and it's kinda
hard to format it in a way that makes sense to the end-user. So, we removed
that portion of the code (or commented it out for a while).
The new behavior is to simply allow scripts to do: splashy_update "scroll
foo" to send things that the end-user should be seeing. And this is only
seen if the user actually presses F2.
This is what I remember from the top of my head. It definitely needs to be
re-worked.
--
----)(-----
Luis Mondesi
Maestro Debiano
----- START ENCRYPTED BLOCK (Triple-ROT13) ------
Gur Hohagh [Yvahk] qvfgevohgvba oevatf gur fcvevg bs Hohagh gb gur fbsgjner
jbeyq.
----- END ENCRYPTED BLOCK (Triple-ROT13) ------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/splashy-devel/attachments/20080416/97779b05/attachment.htm
More information about the Splashy-devel
mailing list