Commit graph

1296 commits

Author SHA1 Message Date
Ray Strode
e9c7b34fba [client] debug mode if plymouth:debug in /proc/cmdline
We currently do this for the daemon.  We should do it for
the client as well.
2010-01-26 01:19:59 -05:00
Charlie Brej
8066ee53ad [script] Add get functions for all sprite properties
Adds GetImage/X/Y/Z/Opacity to get the current values of the sprites.
This is for convenience of not having to store them in the script.
2010-01-25 23:10:24 +00:00
Charlie Brej
437be1c6db [script] Use floor when implementing Int
Previously the Math.Int function converted to int and back to double.
The floor function works larger than those represented by integers and it
correctly handles NaN and Inf.
2010-01-25 20:36:35 +00:00
Charlie Brej
bef862fa92 [script] Add a random number generator
Adds Math.Random() which returns a random number between 0 and 1.
2010-01-25 20:31:17 +00:00
Ray Strode
d34694c1b9 [daemon] drop libply-splash-graphics dependency 2010-01-14 17:26:26 -05:00
Ray Strode
306af2b933 [branch-merge] Drop libpng requirements from base install
Right now, plymouthd links against libplybootsplash which links
against libpng.  Only graphical splashes use libpng, but it's
always pulled in.

This merge splits libplybootsplash into two libraries: the core
bits, and the extractable graphical bits.  Only the graphical splashes
link against the latter library.  This way server installations can
get plymouth without pulling in libpng.  This will reduce the amount
of security errata deployed to those server installations.
2010-01-14 17:05:15 -05:00
Ray Strode
4f02890e05 [splash] Split out graphical parts of libply-splash-core
We now have a libply-splash-graphics for handling the
graphical bits.  In particular, this means plymouthd no
longer links against libpng.
2010-01-13 16:52:17 -05:00
Ray Strode
cc85f63927 [splash] Rename libplybootsplash to libply-splash-core
Splashes aren't just shown for "boot" so including "boot" in
the name isn't right.  Also, right now we link against libpng
even if we don't have any splash that uses it.  This is the first
step toward making libpng only get linked to graphical splashes.

We'll need to move the graphical bits to their own library to
complete the process.
2010-01-13 16:47:09 -05:00
Ray Strode
ba0e786c46 [details] don't include ply-image.h 2010-01-13 16:24:18 -05:00
Scott James Remnant
4c35dfb1ca [main] quit program when quit given after deactivate
If plymouth quit (without --retain-splash) follows plymouth deactivate,
plymouth will never actually quit (or pull the trigger for the client)
2009-12-22 22:44:21 -05:00
Scott James Remnant
19412c8a4d [main] avoid crash when no splash running
We haven't saved the passed deactivate trigger to the state,
so it won't be set there.  Just pull it directly.
2009-12-22 22:42:40 -05:00
Scott James Remnant
32ee3f6ab8 [main] Don't free renderer when NULL
If we weren't showing the splash screen, we'll have no renderer
2009-12-22 22:42:19 -05:00
Ray Strode
d90011551f [branch-merge] Add man page
This merges the "man-page" branch to master.

Thanks to Adrian Glaubitz we now have a man page for plymouth.

This is a good start to documenting the basics of plymouth.

We'll eventually need more comprehensive reference documentation
before 1.0 is released, and now we have some of the ground work
(a docs/ directory) for that.
2009-12-16 13:20:34 -05:00
Ray Strode
1fa0bf62b7 [docs] Remove commented out section from man page
We don't have a --version and it was adding a gap in the output
2009-12-16 13:19:23 -05:00
Ray Strode
ea12d818cd [docs] Update home page url in man page 2009-12-16 13:13:45 -05:00
Ray Strode
2c7b357ff8 [docs] Fix AUTHORS in man page 2009-12-16 13:13:45 -05:00
Ray Strode
68f3af377a [docs] Clarify "rhgb" cmdline option in man page
Previously, it said that "rhgb" was required for plymouth
to run, but plymouth runs no matter what.  This just
specifies which splash is displayed
2009-12-16 13:13:45 -05:00
Ray Strode
15c824cc4b [docs] Remove instructions about boot loader
They weren't completely accurate, you don't need to reinstall
grub after editing its config, since it has built-in filesystem
drivers.  Also, those details very from system to system, so we
should probably just leave it out.
2009-12-16 13:13:45 -05:00
Ray Strode
5da891bbaa [docs] Add reference to splash cmdline in man page
It referenced rhgb, but not splash.  While rhgb was
there first, most distributions use splash since it's
more logical (among other reasons).
2009-12-16 13:13:45 -05:00
Ray Strode
fcd88849b3 [docs] Remove distribution references from man page
We don't want to provide a history of what distributions
used before plymouth, because that history could get long,
isn't super relevant, and will add noise for a users looking
for help (they probably only care about their distributions,
not others).
2009-12-16 13:13:45 -05:00
Ray Strode
56c1b86493 [docs] Rename man/ to docs/
This way we can put other documents there as well.
2009-12-16 13:13:41 -05:00
Adrian Glaubitz
6b879b6c71 [docs] Add man page
It explains the basic concepts of plymouth and the usage of tools to be
used to setup it.
2009-12-16 08:35:37 -05:00
Adrian Glaubitz
c588145997 [set-default-theme] Provide GNU-style short options 2009-12-16 08:35:06 -05:00
Charlie Brej
828fda6fb5 [set-default-theme] Make --help format match that of plymouth and plymouthd
Minor rejig to make the help messages more consistant. Also removes some tabs
and empty lines.
2009-12-14 21:29:01 +00:00
Ray Strode
e40e0b8719 [set-default-theme] Call usage function in --help
This way the top line of the help output gives usage.
2009-12-05 12:08:53 -05:00
Adrian Glaubitz
8d6358fc4f [set-default-theme] Add --help option
When running new, unfamiliar commands I usually invoke them with
--help to see what options they have. For plymouth-set-default-theme,
there is no --help option which I find a bit confusing, especially
since the usage is not straight-forward.

There is now an additional function "show_help" which displays an
help output when invoking plymouth-set-default-theme with --help.
2009-12-05 12:08:01 -05:00
Scott James Remnant
7899b6092a [main] Fix fd leak
When redirecting stdio to the tty, the
tty was opened and its fd was dup()'d to
the standard ones, but then wasn't closed.
2009-12-04 11:02:31 -05:00
Charlie Brej
9ed3080fc6 [script] Add widow get position functions
These are the Window.GetX/Y that pair up with Window.SetX/Y already present.
They return the position of the window.
2009-12-02 22:23:26 +00:00
Charlie Brej
020bec1ac8 [configure] Make maintainer mode default to on but not explicit in autogen
Maintainer mode is assumed on when executing configure, and thus is not needed
within autogen.
2009-11-30 22:17:14 +00:00
Charlie Brej
d7c75892e9 [viewer] Quit on window close when not in icon mode.
Previously, in non-icon mode when clicking on the window decoration close, the
window would hide and carry on running. It should quit.

https://bugs.freedesktop.org/show_bug.cgi?id=20228
2009-11-29 22:30:29 +00:00
Charlie Brej
9820d117c7 [fade-throbber] Draw password dialog even if not animating
If is_animating was not set, the draw would quit before drawing the dialog.
2009-11-29 13:11:39 +00:00
Charlie Brej
69deaaa30a [script] Pass color to the text renderer
We collected the color information before, but did nothing with it.
2009-11-29 02:51:10 +00:00
Charlie Brej
1c6adf70da [label] Add color control
Previously we drew two overlapping labels, one in black and one in white, to
make sure it was vsible on all backgrounds. Now we can pick an appropreate
color for each theme. The default is white. If changing the label color once it
has been shown, it will redraw that part of the screen.
2009-11-29 02:35:10 +00:00
Charlie Brej
7e487da507 [script] Allow setting the position of the windows
Although the windows are set up to in a reasonable default configuration, the
themes may align the windows differently to not crop some important elements.

The Window.SetX and SetY allow positioning the window anywhere on the canvas.
Use this sparingly as it induces a full refresh of all screens.

If there is a desire to have totally different scenes, the second window can be
positioned somewhere far away so there is overlap and a complete different set
of sprites is used. Another sensible configuration is to have the screens side
by side and allow sprites to span the gap. Remember to create password dialogs
for each screen as not all may be visible.
2009-11-29 01:19:37 +00:00
Charlie Brej
d2f16135f0 [script] Handle multiple displays with one script instance
When multiple displays were introduced, each display had its own script plugin
instance. This made things easy as the scripts would not have to be rewritten
for multiple screens. Unfortunately this also meant that each image was loaded
multiple times, and the scripts consumed much more processing power.
Additionally the scripts were not aware of each other.

This patch allows a single script instance to control multiple displays while
maintaining reasonable backward compatibility. All sprites are placed on a
virtual canvas. Displays (or windows) then expose parts of this canvas to the
user.

As a default, window 0 is placed at 0,0. Further windows are placed on top of
the window 0 area matching the centre point so the password dialog (which is
placed in the centre) is visible on all windows. If you target window 0 only
and you place dialogs in the middle of the screen, then everything should work
fine.

Window.GetWidth/GetHeight now takes a window number (if none supplied it will
assume 0). If it replies a NULL, then you accessed beyond the end of the
window set.
2009-11-29 00:20:52 +00:00
Charlie Brej
53563a3fc4 [list] Initialise node in the get Nth function
Typo in the previous patch.
2009-11-28 23:52:53 +00:00
Charlie Brej
59a015b4af [list] Add get Nth node function
Gets the Nth node in the list. If the index is outside the range, it will
return NULL
2009-11-28 23:31:11 +00:00
Charlie Brej
49cb1714cf [list] Add a stable sort
Stable sort sorts but does not change the order of elements which are equal.
This is important in the sprite based plugins where if the level of the sprites
is equal because it may be unimportant which is on top, changing the order
between frames looks bad.
2009-11-28 20:08:09 +00:00
Charlie Brej
0b23228d41 [region] Actually perform the sort when requested
Typo, sort line was missing.
2009-11-28 19:35:38 +00:00
Charlie Brej
2152c8c830 [region] Allow rectangles to be sorted before being fed back
The renderers commit the rectangles derived from the region in a random order.
This gives some tearing as the screen is displayed with a random regions in
their new state. The change sorts the list of rectangles according to their Y
value to commit them from top to bottom. This gives fewer tear lines.
2009-11-28 19:10:53 +00:00
Charlie Brej
ac38fe872a [list] Replace the old sort function with quicksort
It is a simple quicksort implementation which does no randomisation.
2009-11-28 18:51:54 +00:00
Charlie Brej
48b61807ba [list] Adds tests of the sort function
Sorts 100 random integers. Reports any out of order and returns an error code.
2009-11-28 18:47:44 +00:00
Charlie Brej
a8c9973d67 [list] Add test code of the sort function 2009-11-28 18:45:49 +00:00
Ray Strode
5ab7551533 [branch-merge] Improve plymouth -> X hand off
This merges the "no-fbcon" branch to master.

Previously, the way to get a transition between
plymouth and X was for plymouth to quit,
leaving the tty in KD_GRAPHICS mode, and hope
X starts and picks up the peices.  In this
limbo state where plymouth isn't running but X
isn't started yet the user is unable to
switch VTs or really do anything at all.

If X doesn't start then the user is hosed; they
have to reboot.

Now, instead of quitting plymouth before starting
X we "deactivate" it.  This gets plymouth into a
state where X can take over the display, but
plymouth stays running.  Once X has fully started
up or failed to start the display manager can
tell plymouth to quit (with --retain-splash if
X started successfully and without if X started
unsucessfully)
2009-11-28 00:33:06 -05:00
Ray Strode
d52b4efba1 [client] Add new deactivate subcommand
This tells the daemon we're about to start X with -nr and
to get ready for the transition.
2009-11-28 00:24:59 -05:00
Ray Strode
45967baeb0 [daemon] deactivate daemon for X transition
In order for plymouth to be able to stay around until
after X is started, we need to put the daemon into a
"deactivated" state where it makes the splash becomes idle
and relinquishes control of the scan out hardware and keyboard
for X to seize.

This commit listens for deactivation requests in the daemon and
performs the deactivation.

A future commit will implement the client bits needed.
2009-11-28 00:24:59 -05:00
Ray Strode
fe6d25904d [x11] implement new activate/deactivate methods
We disable flushing when inactive.
2009-11-28 00:24:59 -05:00
Ray Strode
92bf5acfa2 [frame-buffer] implement new activate/deactivate methods
We basically just do what we were doing before
implicitly on VT switch, explicitly on activate
and deactivate.
2009-11-28 00:24:59 -05:00
Ray Strode
9f2b4b418a [drm] implement new activate/deactivate methods
We basically just do what we were doing before on
implicitly on VT switch, explicitly on activate
and deactivate.

We also don't scan out the splash to the fbcon
on unmap if the renderer is inactive.
2009-11-28 00:24:59 -05:00
Ray Strode
40f685be7c [renderer] Add new activate and deactivate methods
The point of these methods are to put the renderer in
and out of a state where it is no longer going to
be on screen.

This should cause flush calls to be no-ops and device
specific locks should be dropped.

These methods will be necessary to keep plymouth running
while X is getting started up.
2009-11-28 00:24:58 -05:00