Commit graph

1211 commits

Author SHA1 Message Date
Charlie Brej
8debba60b0 [label] Operate with display set to NULL
Performing a ply_label_show with the display set to NULL allows the label to be
drawn any pixel buffer and not perform any redraw events.
2009-11-17 22:46:32 +00:00
Charlie Brej
bfaa5e9742 [label] Clean up dirty area on change of text or position
When the text or the position is changed, label will call draw events on areas
which were previously drawn on.

The two-step plugin is updated with the new method.
2009-11-17 22:03:41 +00:00
Charlie Brej
469578a974 [two-step] Add support for showing message text
Display the message text passed using the message plymouth command. This is
separate from the password prompt text.
2009-11-16 23:34:45 +00:00
Charlie Brej
7a003c41a6 [animation] Make sure we do not access frames beyond the end of the animation
Small bug which would try to access the animation frame beyond the end of the
array. Only occurs when doing a redraw after the animation has completed
(e.g. password dialog).
2009-11-16 23:24:20 +00:00
Ray Strode
d009c99eaa [region] Add missing break statement
This meant that in some cases the region was getting trimmed to
aggresively.
2009-11-14 23:20:18 -05:00
Charlie Brej
d6b55c6801 [image] Optimise interpolate and rotate routines.
These are small optimisation to: terminate interpolation early when operating
on fully transparent regions and do rotations by pre-computing the step size
rather than calling cos/sin/atan. These use around 30% fewer instructions on
general images.
2009-11-14 21:38:11 +00:00
Ray Strode
e0d482a7cb Revert "fasdf"
This reverts commit 92dd3083d0.
I have no idea why I commited that or pushed it.
2009-11-13 22:21:40 -05:00
Ray Strode
808e129fd1 [drm] Don't remove drm fb's that we don't know
When we access to the kernel console's fb, we don't own
it and shouldn't remove it.

Spotted by Scott James Remnant.
2009-11-12 12:48:54 -05:00
Ray Strode
a750b43584 [console] Fix ioctl call
it was doing if (!ioctl ... < 0).  Spotted by
Scott James Remnant
2009-11-12 09:15:57 -05:00
Ray Strode
fa912fbf5d [console] remove stray semicolon 2009-11-12 09:10:12 -05:00
Ray Strode
92dd3083d0 fasdf 2009-11-10 17:42:05 -05:00
Ray Strode
a30ec0193e Force terminal into raw mode on every write call
This is a76c5bc4b7 but for
text plugins.
2009-11-10 15:05:59 -05:00
Ray Strode
8e70c530ea [set-default-theme] Drop nash dependency
Now we require one of

1) /bin/plymouth being installed
2) PLYMOUTH_PLUGIN_PATH being set
3) LIB being set (for compatibility)
2009-11-03 23:31:51 -05:00
Ray Strode
5b53999611 [main] Don't add duplicate text display
Before we were adding the same text display once at start up
and once on show splash.
2009-10-29 17:12:28 -04:00
Ray Strode
ee7588b9d4 [console] Function in degraded mode when closed
Not all machines will have /dev/tty0.  Those that
don't should still work.
2009-10-29 17:11:00 -04:00
Ray Strode
0980923c85 [main] Don't unlink /dev/null
In shutdown mode we were unlinking a file that was set to /dev/null.
Removing /dev/null is a bad idea.
2009-10-29 10:05:36 -04:00
Charles Brej
a086ae755b [script] Convert example script functions to use objects
The example script had some old style function names. These still work due to
the compatibility translations, but are not recommended in new code.
2009-10-29 13:36:27 +00:00
Charlie Brej
36a1b35570 [script] Add an "on quit" callback to scripted themes
The callback is called before the final sprite refresh and quit. This allows
the theme to tidy up the screen before handing over to the X fade and the
destop manager.
2009-10-28 20:11:47 +00:00
Ray Strode
d63a2aec8d [text] Don't redraw views after password request
The text plugin doesn't have proper draw handlers at
the moment.  Drawing happens outside of the draw handlers,
and the draw handlers only clear screen.  Don't force
draw_area calls because that clears any drawing.
2009-10-14 11:32:03 -04:00
Charlie Brej
e669839d66 [script] Sprite and Image objects inherit from an empty scalar
Sprite and Image objects now inherit from an empty scalar which can be used to
keep any random data assoceated with that object. Previously there was a
dangerous tendency to pass any scalar operations to the top inherrited scalar
which was the class prototype.
2009-10-13 22:41:42 +01:00
Charlie Brej
e06b403ea0 [script] Change order of spriterefresh operations to remove an incorrect redraw
If a full refresh takes place, the system redraws the whole window but forgets
to remove sprites and update their old positions. The full window refresh is
now done last. Also old_width, and old_height are initialised at sprite
construction.
2009-10-13 22:23:36 +01:00
Charlie Brej
515fdd0105 [main] Truncate output debug file
Truncates the debug file to clear any previous data. Previously, if a run had a
shorter debug data, some data from a previous run would still be present at the
end of the file.
2009-10-13 22:20:11 +01:00
Frederic Crozat
6e3ae665bc [ daemon ] handle plymouth:force-splash on kernel cmdline
When booting with init=..., plymouthd disables itself. It is problematic
when using bootchartd (bug #22180). plymouth:force-splash allows to
force plymouthd splash.

Ensure init= value is not used when starting plymouthd for shutdown.
2009-10-13 18:01:24 +02:00
Ray Strode
6547d48fde [x11] initialize head on query not map
Do it for the same reason we did it in the frame-buffer
plugin in the previous commit.  It's the "right" thing
to do and now that we map lazily, doing it the old way
is broken.
2009-10-12 19:40:08 -04:00
Ray Strode
5d631743d6 [frame-buffer] initialize head on query not map
That's the "right" thing to do and now that we
map lazily, doing it the old way is broken.
2009-10-09 17:38:17 -04:00
Ray Strode
89f07b8f81 [renderer] map buffer lazily
This is to prevent screen clears on plugins that don't
use the renderers (text plugins)
2009-10-08 17:18:41 -04:00
Ray Strode
bda90f63c1 [renderer] make map and unmap idempotent 2009-10-08 15:59:15 -04:00
Ray Strode
30fa8e2d48 [keyboard] make stop_watching_for_terminal_input idempotent 2009-10-08 15:42:27 -04:00
Ray Strode
e938daa05b [renderer] make input_source_close idempotent 2009-10-08 15:41:06 -04:00
Ray Strode
78d610e82a [main] remove displays before closing renderer 2009-10-08 15:40:16 -04:00
Ray Strode
d8835ebfd3 [terminal] Only close terminal on free when open
We were closing the terminal twice, causing assertions
to blow.
2009-10-08 15:33:40 -04:00
Ray Strode
288c110fa1 [main] Disconnect from tty when hiding splash
We were still processing keystrokes when the splash screen was
hidden. This caused problems because the tty is used by other
programs at that time.
2009-10-08 15:22:27 -04:00
Ray Strode
0bb06a8afa [drm] Destroy console buffer object on error path
We were leaking the object if it couldn't be mapped.
2009-10-07 17:26:16 -04:00
Ray Strode
3228d0534d [drm] Destroy console buffer object when done with it 2009-10-06 19:07:41 -04:00
Ray Strode
adf98f119b [main] clean up terminal when done with it
Before we were relying on the renderer to clean
up the terminal, which was wrong.
2009-10-06 16:47:41 -04:00
Ray Strode
4c777de9fc [renderer] close device on failures
Before we were just unloading the module without
closing it.
2009-10-06 15:31:53 -04:00
Ray Strode
3d53c471d7 [drm] don't close terminal
It belongs to the core daemon, not the plugin.
2009-10-06 15:30:50 -04:00
Ray Strode
3ca5e37324 [drm] Drop master on VT switches
This improves plymouth's interaction with X.
2009-10-06 10:50:42 -04:00
Ray Strode
7a87b2210b [text] Don't crash after password prompt
We were treating the passed in view to the
draw handler as if it was the plugin itself.
2009-10-05 17:37:48 -04:00
Ray Strode
2af482af16 [main] Properly reinitialize environment on show splash
Before we were tearing down the displays and keyboard on hide
splash but not bringing them back on subsequent show splashes.

This fixes that.  We can probably throw less stuff away on
hide splash, but this is a more conservative fix for now.
2009-10-05 16:51:40 -04:00
Charlie Brej
80389c14cb [script] Give sensible unique-ish strings for all objects.
All objects can now be transformed into strings which allows them to be used as
hash indexes. Some rules do still apply. If an object is lost (freed....)
another object may take on the name of the lost one. The object address is used
to create a string in the form "#(0x123abc45)". NULL has the string "#NULL".
So arr[NULL] is the same as arr["#NULL"], and similar for the objects.
2009-10-04 18:03:23 +01:00
Charlie Brej
6c4b2630f0 [script] Do not segfault if accessing array with no key
Things like "array[] = 7" would cause a crash.
This is now caught and warned about during the parse.
2009-10-04 17:56:38 +01:00
Charlie Brej
dcd543c17d [script] Allow inline array definitions
This can be used to initialise an array:
arr = [12, 43];	   // arr[0] = 12; arr[1] = 43;

Or create an empty object:
obj = [];
2009-10-04 17:46:59 +01:00
Charlie Brej
9ca46671bb [script] Add do-while loops
Format is:
    do {operations} while (condition);
or
    do operation; while (condition);

Like in C, the semicolon at the end is necessary.
2009-10-04 17:36:22 +01:00
Ray Strode
a29f25bc6c [branch-merge] Add x11 renderer plugin
This merges the "x11-renderer" branch to master.

In order to make debugging splash plugins easier,
and in order to make debugging multi-head renderering
possible on single head displays, Charlie wrote an
X11 rendering plugin.

This plugin displays plymouth in a running X session,
instead of on the console.

It currently only supports graphical plugins.  At some
point it may grow support for text plugins, too, using
vte.  That will take some reworking of the plymouth
daemon core.

This could some day serve as a basis for providing a
graphical theme chooser application (like
gnome-screensaver-preferences), although it's not clear
yet that's a good idea.

Right now, it's a great debugging and development tool,
though.
2009-10-04 10:47:36 -04:00
Ray Strode
08466deaf8 [x11] Throttle plymouth to X server
Some drivers completely choke with the amount of data plymouth is
sending over the wire.  This makes sure that plymouth doesn't
keep assaulting the X server when it's already overworked by asking
the server to return back a pixel before continuing.
2009-10-04 10:45:38 -04:00
Ray Strode
9fba779c39 [x11] Tile windows initially 2009-10-04 10:45:38 -04:00
Ray Strode
478a2948ef [x11] Move windows when dragged
Since they don't have title bars now, we need to
provide and easy way for them to be moved around.
2009-10-04 10:45:37 -04:00
Ray Strode
eb8e93f383 [x11] Hide title bar
It's not useful.
2009-10-04 10:45:37 -04:00
Ray Strode
84421722c1 [x11] Ignore ply_console_set_mode calls
Since X is rendering to the console, we don't need
(or want) to move the console between KD_GRAPHICS
and KD_TEXT mode.
2009-10-04 10:45:37 -04:00