Commit graph

1460 commits

Author SHA1 Message Date
Steve Langasek
5de9b303bb [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.
2010-04-20 12:08:05 +01:00
Charlie Brej
9124886efe [progress-animation] Typo bug in calculating max height
Was looking at the width rather than the height of the second image
2010-04-18 21:44:49 +01:00
Charlie Brej
fb7fa46b7b [progress-animation] Remove unnecessary draw area
Must have been left over from some debugging
2010-04-18 21:43:41 +01:00
Charlie Brej
4e1d670c8a [progress-animation] Remove some now unnecessary area calculations 2010-04-18 21:17:58 +01:00
Charlie Brej
f07024331d [progress-animation] Convert more functions to use buffer fill with buffer 2010-04-18 21:09:00 +01:00
Charlie Brej
6ee88aaec7 [image] Give get buffer function more sensible name
There was a "_convert_" in the middle of the function name from a clumsy copy
paste.
2010-04-18 20:43:06 +01:00
Charlie Brej
f9316f97a4 [progress-animation] Use buffer fill with buffer instead of with raw data 2010-04-18 20:32:27 +01:00
Charlie Brej
e98b8f1e3e [entry] Allow setting of text color
Default color is black.
2010-04-18 20:20:34 +01:00
Charlie Brej
f4a1cca351 [entry] Fix ask question entry text
The text was not being shown because show was not called. Also the default
colour is white which was not showing up on white background.
2010-04-18 20:10:17 +01:00
Charlie Brej
0f28114270 [entry] Convert from drawing image raw data to using pixel buffers 2010-04-18 20:01:26 +01:00
Charlie Brej
b9ad6d5af3 [image] Add asserts to make sure NULL is not passed as the image 2010-04-18 19:27:46 +01:00
Charlie Brej
b6028cb412 [image] Allow access to the internal image buffer
Adds ply_image_convert_get_buffer to get the image buffer without destroying
the image. Forgot to add the .c.
2010-04-18 19:24:08 +01:00
Charlie Brej
b604415ceb [image] Allow access to the internal image buffer
Adds ply_image_convert_get_buffer to get the image buffer without destroying
the image.
2010-04-18 19:22:49 +01:00
Charlie Brej
1eb3bfef85 [script] Simplify sprite area calculation
The sprite area no longer needs to be calculated as the buffer holds that
information.
2010-04-18 17:53:11 +01:00
Charlie Brej
8852b247bb [script] Use fill with buffer function 2010-04-18 17:38:23 +01:00
Charlie Brej
7c63590c06 [animation] Use fill with buffer function 2010-04-18 17:20:52 +01:00
Charlie Brej
cf609f0338 [throbber] Use fill with buffer function 2010-04-18 17:17:08 +01:00
Charlie Brej
d93ae6cdc7 [pixel-buffer] Add fill buffer with buffer functions
These draw the content of one buffer into another. This is cleaner than using
the raw data and passing the width and height of the data separately.
2010-04-18 17:14:21 +01:00
Charlie Brej
1cce2033ea [animation] Move frames from image to pixel-buffers
The frames are now stored as pixel-buffers which will be cleaner to draw from
in the future.
2010-04-18 16:17:00 +01:00
Charlie Brej
8c455e2383 [throbber] Move frames from image to pixel-buffers
The frames are now stored as pixel-buffers which will be cleaner to draw from
in the future.
2010-04-18 15:51:17 +01:00
Charlie Brej
28ca40f6d5 [pixel-buffer] Add get width and height functions
These were accessible by the get_size function, but individual functions are
more convenient.
2010-04-18 15:47:00 +01:00
Ray Strode
9f79d59d51 [main] Ignore keyboard changes when deactivating
There is a small window after plymouth is told
to quit or deactivate before it actually does.

During this window, if the user happens to hit
escape, bad things could happen.

We really don't want to mess with, e.g., the tty
settings when we're about to exit.

This commit puts plymouth in a sort of "degraded"
mode while it's deactivating.  During this time
frame, user input is ignored.
2010-04-14 15:42:54 -04:00
Ray Strode
559a1b2ff4 [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.

We no longer do that after commit

e9a22723da

Instead of changing it every time, it's probably
better to just prevent other programs from messing
up the settings in the first place.

This commit locks the terminal so if those programs
try to change the settings, they fail.

A better long term solution might be to get user input
/dev/input instead of the tty
2010-04-14 15:09:23 -04:00
Charlie Brej
4c9b12fd2e [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.
2010-04-13 21:05:04 +01:00
Ray Strode
5daa29168d [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.
2010-04-13 14:24:35 -04:00
Frederic Crozat
52757e5801 [drm] Drop drm/ from include directives
One file was missing the fix.
2010-04-13 17:43:13 +02:00
Ray Strode
c4f46b6262 [configure] bump to 0.8.1 2010-04-12 13:39:58 -04:00
Ray Strode
63e9bbd44f [boot-splash] Remove displays before unloading plugin
If we don't do this, then the splash display handler will
still be set, causing all sorts of undefined and weird
behavior.

This makes hitting the escape key multiple times act more
reliable.
2010-04-12 13:18:15 -04:00
Ray Strode
1285196e59 [main] Use updated terminal attrs on crash
In commit ea394383c5 I changed
the terminal settings used by ply-terminal.  This commit puts
those same settings into effect in the crash path.
2010-04-09 16:07:11 -04:00
Ray Strode
fe9d56bee8 [main] add more debugging messages 2010-04-09 16:06:15 -04:00
Ray Strode
31a958f7e0 [configure] Add some heuristics to find drm headers
On my system, some headers seem to be stuffed in /usr/include/libdrm
and other headers seem to be stuffed in /usr/include/drm .

I think the ultimate upstream goal is for everything to be in
/usr/include/libdrm but my system seems to be in some transition state.

My pkgconfig files only point me to one of the directories, so add some
heuristics to find the other one.
2010-04-09 15:33:28 -04:00
Ray Strode
790f6d4401 [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.
2010-04-05 10:14:47 -04:00
Charlie Brej
417beaca9b [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.
2010-04-02 17:24:07 +01:00
Ray Strode
e588785758 [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.
2010-04-01 14:37:41 -04:00
Charlie Brej
cde2b9c642 [script] Only attach to the keyboard if it has been set
Don't add an input handler to a NULL keyboard.
2010-04-01 17:26:58 +01:00
Charlie Brej
ff77bbfdda [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.
2010-04-01 15:47:29 +01:00
Ray Strode
855ea1bbf5 [drm] Drop drm/ from include directives
They've moved to a different directly with the latest
libdrm, and we should be relying on pkgconfig anyway.
2010-03-31 21:29:16 -04:00
Charlie Brej
0664bce5fd [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.
2010-03-31 19:16:36 +01:00
Colin Watson
f83e2bb5e1 [frame-buffer] Initialize backend->head.map_address
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.
2010-03-30 20:46:57 +01:00
Charlie Brej
92cc20f82f [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.
2010-03-29 22:56:11 +01:00
Ray Strode
2d3dd0c3be [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.
2010-03-29 15:20:44 -04:00
Ray Strode
0ddc9333e4 [drm] Add more debug messages
These messages give a clearer view into what's
happening when moving drawing from plymouths
buffer to the kernel's console buffer.
2010-03-29 15:14:15 -04:00
Steve Langasek
02ca382344 [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.
2010-03-29 11:51:24 +01:00
Charlie Brej
991549626b [plymouth-set-default-theme] Replace tabs with spaces 2010-03-25 22:42:26 +00:00
Charlie Brej
6afeecaafe [script] Allow alpha color component to be set when generating text images
The Image.Text function now accepts an alpha parameter of the color used. If
not set this will be assumed to be 1 (thus reverse compatible).
2010-03-25 18:26:01 +00:00
Frederic Crozat
75ae8d50cc [plymouth-set-default-theme] handle old symlink configuration file 2010-03-25 17:30:41 +01:00
Ray Strode
05dc13ad0f [configure] bump to 0.8.1 2010-03-24 17:03:50 -04:00
Ray Strode
f119e8a047 [client] add update subcommand
This is to replace the old style --update option.
2010-03-24 16:57:40 -04:00
Ray Strode
544f5bae0a [client] add hide-splash and show-splash subcommands
This is to replace the old style --hide-splash and --show-splash
options.
2010-03-24 16:43:19 -04:00
Ray Strode
c0637bd800 [client] add new update-root-fs command
This supercedes --newroot and --sysinit into one
command following the newer subcommand method of
using the plymouth client.
2010-03-24 16:38:40 -04:00