Ray Strode [Wed, 26 May 2010 17:58:46 +0000 (13:58 -0400)]
[main] Don't VT switch on hide splash
This is an in-progress patch, that ultimately may not
make sense on master.
It makes it so the vt switch on quit doesn't happen on hide-splash.
This would be useful in cases where init and plymout run on the same
vt, and that vt isn't vt7.
Ray Strode [Wed, 26 May 2010 17:10:46 +0000 (13:10 -0400)]
[main] Be more forgiving of an absent boot splash
Mandriva has cases where they need to drop to details mode
before /usr is mounted. /usr has the details splash plugin,
so this causes plymouth to explicitly exit.
This commit makes plymouth cope with that scenario slightly
better. It takes out the exit(1) call which was clearly bogus,
and also makes parts of the code handle a NULL splash better.
This is not a real fix though.
Ultimately, we should make "details" be built-in as a nice failsafe.
There's no reason we should need to load it off the disk as a plugin.
Ray Strode [Thu, 6 May 2010 17:04:14 +0000 (13:04 -0400)]
[two-step] Add optional header and throbber
These are just a few more bits for themes to optionally
make use of. The throbber gets overlaid with the
progress animation, so they need to be concentric.
The header gets put on top.
Ray Strode [Thu, 6 May 2010 14:04:26 +0000 (10:04 -0400)]
[throbber] Change frame sequencer function
The throbber has a function for determining which frame
to show based on the current time. This function was:
ƒrame(t) = number_of_frames ∙ (⅟₂ sin(t) + ⅟₂)
Which basically oscillates between 0 and number_of_frames - 1,
over and over again. There are two problems with this function;
- after it runs through all the frames in order, it then procedes
to run through them backward.
- This function also starts in the middle of the set of throbber
frames.
These problems don't matter for spinfinity, but will look wrong for most
other themes.
The new function is this:
ƒrame(t) = number_of_frames ∙ (1⁄duration)(t mod duration)
This function solves both problems. At time 0 it uses frame 0, and
after the last frame it jumps back to the first frame.
Colin Watson [Wed, 28 Apr 2010 12:31:39 +0000 (13:31 +0100)]
Handle NULL boot_buffer
boot_buffer may be NULL if plymouthd failed to attach to the console
session (e.g. if booting without an initramfs so /dev/pts isn't mounted
yet). Handle this gracefully rather than segfaulting.
Ray Strode [Thu, 29 Apr 2010 17:23:18 +0000 (13:23 -0400)]
[terminal] wait for vt switching to finish on quit
After changing the active vt during start up,
we get a signal when it finishes, because we're in
VT_PROCESS mode, so we don't need to explicitly block
waiting for it to finish.
During the quit path, though, we aren't in VT_PROCESS mode anymore,
won't get any signals, and still need to know that the VT switch
is finished before informing the client that the quit is
finished.
This commit forces ply_terminal_deactivate_vt to block until the
VT switch it initiates finishes.
Steve Langasek [Tue, 20 Apr 2010 11:02:24 +0000 (12:02 +0100)]
[main] Create a list of messages and when showing splash display them
The system now keeps a list of messages so they can be shown again when the
user flips themes or if the messages were passed before the splash was shown.
This also enables the splashes to show multiple messages (should they choose to
do so). There will later be a way of undisplaying a message.
Ray Strode [Wed, 14 Apr 2010 19:04:23 +0000 (15:04 -0400)]
[terminal] Lock terminal settings
From time to time, various external programs
will muck with the tty we're using and make
the users password for encrypted disks show
up, make the enter key not work, etc.
We used to work around this by resetting the
tty the way we like it everytime we write the
screen.
Charlie Brej [Tue, 13 Apr 2010 20:05:04 +0000 (21:05 +0100)]
[pixel-buffer] Remove offsets from buffet fill with data functions
The x and y offsets were supposed to allow only a part of the image data to be
drawn, but this didn't work correctly. Instead the clip region can be used to
emulate the same effect. So the x and y paramiters in these functions are now
dropped. The only instance that used these now uses a clip. All other calls had
x and y set to zero.
Ray Strode [Tue, 13 Apr 2010 18:20:23 +0000 (14:20 -0400)]
[event-loop] Add reference count to event sources
This prevents the event loop from freeing sources
early in an iteration of the loop, and then dispatching
handlers for the source later in that same iteration.
Ray Strode [Fri, 9 Apr 2010 20:07:11 +0000 (16:07 -0400)]
[main] Use updated terminal attrs on crash
In commit ea394383c54dda771dcf59e7ec11280fa945280b I changed
the terminal settings used by ply-terminal. This commit puts
those same settings into effect in the crash path.
Ray Strode [Mon, 5 Apr 2010 14:14:47 +0000 (10:14 -0400)]
[client] Allow unlimited unlock attempts
The ask-for-password command has an option
to specify the maximum number of retries to
get the correct password. The default number
of retries was 3. This makes sense for /opt,
and to a lesser degree /home, but it doesn't
make sense at all for /, since failing means
the system won't boot.
The new default is "unlimited". This fixes the
/ case, but has the downside that all integration
code that was depending on the 3 default before
will need to get updated.
Charlie Brej [Fri, 2 Apr 2010 16:24:07 +0000 (17:24 +0100)]
[script] Reference this if function is called with current object as this
If calling a function which is connected to the current object, the object
operated on in the function call is the current object. This is rarely used and
somehow survived without causing crashes despite incorrectly not increasing the
refcount.
Ray Strode [Thu, 1 Apr 2010 18:37:41 +0000 (14:37 -0400)]
[drm] Conditionalize fb fallback with 1-head ttm
When using the old style transition code path where
plymouth quits before X starts, we can't use the drm
renderer for single head nouveau and readeon setups
because their kernel memory manager doesn't allow userspace
write access to the console fb and the old style
transition code needs to dump the last frame of the
plymouth animation to the console fb as intermediate step
of the transition process.
The newer plymouth deactivate mechanism doesn't need the
intermediate console fb copy, so we can stick with the
drm renderer all the time.
This commit conditionalizes the "bail to frame-buffer renderer"
check based on whether the build is configured to enable
the old style transition.
Charlie Brej [Thu, 1 Apr 2010 14:47:29 +0000 (15:47 +0100)]
[script] Connect and disconnect the keyboard on start and stop
Previously we were connecting to the keyboard but not disconnecting from it as
unset_keyboard was not called before the plugin being destroyed. Now we connect
when on splash start and destroy which makes sure we disconnect before being
destroyed.
Charlie Brej [Wed, 31 Mar 2010 18:16:36 +0000 (19:16 +0100)]
[terminal] Do not discard the input when turning the terminal unbuffered
Drawing to renderers was resetting the terminal to unbuffered, but this was
also discarding any queued input keys. The fix should keep the input buffer
untouched.
It's possible for activate to be called before map_to_device, for
example if a non-graphical splash plugin is in use. Initialize
map_address to MAP_FAILED so that we won't try to redraw in this
situation.
Charlie Brej [Mon, 29 Mar 2010 21:56:11 +0000 (22:56 +0100)]
[main] Watch keyboard input after the splash had a chance to quit
If the splash hasn't picked up any displays it will abort. We wait for the
possible abort before attaching the keyboard. This is a slight hack as now
add_displays_and_keyboard_to_boot_splash no longer adds the keyboards. Also the
splash plugin can access the keyboard before it is officially opened.
For now it just fixes the terminal fd < 0 assertion bug.
Ray Strode [Mon, 29 Mar 2010 19:20:44 +0000 (15:20 -0400)]
[main] watch keyboard input after displays are added
Since the boot splashes handle opening the terminal now,
we need to make sure that we don't try to watch for input on
the terminal until they've opened it.
This should fix some crashes users are reportedly seeing with
the details splash.
A potentially better fix would be to make watch_for_input defer
doing anything on its own using the terminal is opened. That
would require a trigger and some new api to ply-terminal, I think.
Steve Langasek [Mon, 29 Mar 2010 10:51:24 +0000 (11:51 +0100)]
[main] Watch-for-keystroke should also be sensitive to enter
Because enter and general keystrokes are handled separately, enter would not
activate the keystroke trigger. Now, you can watch specifically for an enter
press, and enter is accepted as a general any-key trigger.