summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-04-03 23:30:20 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-04-04 00:00:43 +0300
commit917e5973ff56d955082899ffcf7a3f4e742ad8d9 (patch)
tree6c34b81937c28d72d531d914a72eab1edddde13a
parentc938a9cff9c33954b3c5f1f8400d31f6a0e06f26 (diff)
downloadmetacity-917e5973ff56d955082899ffcf7a3f4e742ad8d9.tar.gz
compositor: try to use root window background
-rw-r--r--src/compositor/compositor-xrender.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
index 35454082..fa8711bc 100644
--- a/src/compositor/compositor-xrender.c
+++ b/src/compositor/compositor-xrender.c
@@ -846,6 +846,35 @@ root_tile (MetaScreen *screen)
if (!pixmap)
{
+ int width;
+ int height;
+
+ meta_screen_get_size (screen, &width, &height);
+
+ pixmap = XCreatePixmap (xdisplay, xroot, width, height,
+ DefaultDepth (xdisplay, screen_number));
+
+ if (pixmap)
+ {
+ XGCValues gcv;
+ GC gc;
+
+ gcv.graphics_exposures = False;
+ gcv.subwindow_mode = IncludeInferiors;
+
+ gc = XCreateGC (xdisplay, xroot,
+ GCGraphicsExposures | GCSubwindowMode,
+ &gcv);
+
+ XCopyArea (xdisplay, xroot, pixmap, gc, 0, 0, width, height, 0, 0);
+ XSync (xdisplay, False);
+
+ XFreeGC (xdisplay, gc);
+ }
+ }
+
+ if (!pixmap)
+ {
pixmap = XCreatePixmap (xdisplay, xroot, 1, 1,
DefaultDepth (xdisplay, screen_number));
g_return_val_if_fail (pixmap != None, None);