layout: Use a MetaBackgroundActor, not a custom ClutterX11TexturePixmap

While looking at how the plymouth implementation was built, I was so
short-sighted and focused on the string "_XROOTPMAP_ID" that I didn't
realize it was the name of the standard background on the root window.
Remove our own implementation, and switch to using a standard mutter
MetaBackgroundActor.

https://bugzilla.gnome.org/show_bug.cgi?id=682428
This commit is contained in:
Jasper St. Pierre
2012-10-26 11:09:36 -04:00
parent 9396849d56
commit 85728f0d15
3 changed files with 11 additions and 53 deletions

View File

@ -1693,43 +1693,3 @@ shell_global_get_session_mode (ShellGlobal *global)
return global->session_mode;
}
/**
* shell_global_create_xrootpmap_texture:
* @global: The #ShellGlobal
*
* This returns the _XROOTPMAP_ID pixmap that gdm should have stuffed
* in the root window. The goal here is to allow a smooth fade between
* plymouth and the shell greeter. This is also a workaround for gjs not
* supporting raw xlib types.
*
* Returns: (transfer floating): A #ClutterActor that represents the
* _XROOTPMAP_ID pixmap property from the root window.
*/
ClutterActor *
shell_global_create_xrootpmap_texture (ShellGlobal *global)
{
Atom res_type;
int res_format;
unsigned long res_nitems, bytesafter;
unsigned char *data;
Pixmap root_pixmap_id = None;
g_return_val_if_fail (SHELL_IS_GLOBAL (global), NULL);
if (XGetWindowProperty (global->xdisplay,
DefaultRootWindow (global->xdisplay),
XInternAtom (global->xdisplay, "_XROOTPMAP_ID", False),
0, G_MAXLONG, False, XA_PIXMAP,
&res_type, &res_format, &res_nitems, &bytesafter, &data) == Success)
{
if (res_type == XA_PIXMAP && res_format == 32 && res_nitems == 1)
root_pixmap_id = * (Pixmap *) data;
XFree (data);
}
if (root_pixmap_id != None)
return clutter_x11_texture_pixmap_new_with_pixmap (root_pixmap_id);
else
return NULL;
}

View File

@ -136,8 +136,6 @@ void shell_global_reexec_self (ShellGlobal *global);
const char * shell_global_get_session_mode (ShellGlobal *global);
ClutterActor * shell_global_create_xrootpmap_texture (ShellGlobal *global);
G_END_DECLS
#endif /* __SHELL_GLOBAL_H__ */