[mutter/wayland] background: Remove load_still_frame
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] background: Remove load_still_frame
- Date: Wed, 2 Apr 2014 17:15:46 +0000 (UTC)
commit 8373c90cd8c8e3edec5b21a41426d4cb073e8b9e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Apr 2 12:35:24 2014 -0400
background: Remove load_still_frame
Nothing uses it, and it's incompatible with XWayland anyway.
src/compositor/meta-background.c | 84 --------------------------------------
src/meta/meta-background.h | 1 -
2 files changed, 0 insertions(+), 85 deletions(-)
---
diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c
index 4337f70..825ee90 100644
--- a/src/compositor/meta-background.c
+++ b/src/compositor/meta-background.c
@@ -26,8 +26,6 @@
#include <config.h>
-#include <cogl/cogl-texture-pixmap-x11.h>
-
#include <clutter/clutter.h>
#include "cogl-utils.h"
@@ -755,88 +753,6 @@ set_filename (MetaBackground *self,
priv->filename = g_strdup (filename);
}
-static Pixmap
-get_still_frame_for_monitor (MetaScreen *screen,
- int monitor)
-{
- MetaDisplay *display = meta_screen_get_display (screen);
- Display *xdisplay = meta_display_get_xdisplay (display);
- Window xroot = meta_screen_get_xroot (screen);
- Pixmap pixmap;
- GC gc;
- XGCValues values;
- MetaRectangle geometry;
- int depth;
-
- meta_screen_get_monitor_geometry (screen, monitor, &geometry);
-
- depth = DefaultDepth (xdisplay, meta_screen_get_screen_number (screen));
-
- pixmap = XCreatePixmap (xdisplay,
- xroot,
- geometry.width, geometry.height, depth);
-
- values.function = GXcopy;
- values.plane_mask = AllPlanes;
- values.fill_style = FillSolid;
- values.subwindow_mode = IncludeInferiors;
-
- gc = XCreateGC (xdisplay,
- xroot,
- GCFunction | GCPlaneMask | GCFillStyle | GCSubwindowMode,
- &values);
-
- XCopyArea (xdisplay,
- xroot, pixmap, gc,
- geometry.x, geometry.y,
- geometry.width, geometry.height,
- 0, 0);
-
- XFreeGC (xdisplay, gc);
-
- return pixmap;
-}
-
-/**
- * meta_background_load_still_frame:
- * @self: the #MetaBackground
- *
- * Takes a screenshot of the desktop and uses it as the background
- * source.
- */
-void
-meta_background_load_still_frame (MetaBackground *self)
-{
- MetaBackgroundPrivate *priv = self->priv;
- MetaDisplay *display = meta_screen_get_display (priv->screen);
- Pixmap still_frame;
- CoglTexture *texture;
- CoglContext *context = clutter_backend_get_cogl_context (clutter_get_default_backend ());
- GError *error = NULL;
-
- ensure_pipeline (self);
-
- unset_texture (self);
- set_style (self, G_DESKTOP_BACKGROUND_STYLE_STRETCHED);
-
- still_frame = get_still_frame_for_monitor (priv->screen, priv->monitor);
- XSync (meta_display_get_xdisplay (display), False);
-
- meta_error_trap_push (display);
- texture = COGL_TEXTURE (cogl_texture_pixmap_x11_new (context, still_frame, FALSE, &error));
- meta_error_trap_pop (display);
-
- if (error != NULL)
- {
- g_warning ("Failed to create background texture from pixmap: %s",
- error->message);
- g_error_free (error);
- return;
- }
-
- set_texture (self, texture);
-}
-
/**
* meta_background_load_gradient:
* @self: the #MetaBackground
diff --git a/src/meta/meta-background.h b/src/meta/meta-background.h
index c171df3..a861600 100644
--- a/src/meta/meta-background.h
+++ b/src/meta/meta-background.h
@@ -91,7 +91,6 @@ void meta_background_load_gradient (MetaBackground *self,
ClutterColor *second_color);
void meta_background_load_color (MetaBackground *self,
ClutterColor *color);
-void meta_background_load_still_frame (MetaBackground *self);
void meta_background_load_file_async (MetaBackground *self,
const char *filename,
GDesktopBackgroundStyle style,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]