diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-04-03 23:30:20 +0300 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-04-03 23:30:20 +0300 |
commit | 245f84223562b0137b42e686a724a8c6e773efef (patch) | |
tree | 0f1734ecfd876420b4aa9c42e9b954f8a52673c1 | |
parent | 0a533edc82c74f94d91a4496f4ce85c49f240049 (diff) | |
download | metacity-245f84223562b0137b42e686a724a8c6e773efef.tar.gz |
compositor: try to use root window background
-rw-r--r-- | src/compositor/compositor-xrender.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c index 402b268f..4aef318b 100644 --- a/src/compositor/compositor-xrender.c +++ b/src/compositor/compositor-xrender.c @@ -847,6 +847,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); |