… | |
… | |
1277 | bg_pixmap = XCreatePixmap (dpy, vt, window_width, window_height, depth); |
1277 | bg_pixmap = XCreatePixmap (dpy, vt, window_width, window_height, depth); |
1278 | bg_pmap_width = window_width; |
1278 | bg_pmap_width = window_width; |
1279 | bg_pmap_height = window_height; |
1279 | bg_pmap_height = window_height; |
1280 | } |
1280 | } |
1281 | |
1281 | |
1282 | if (bg_pixmap == None) |
1282 | if (bg_pixmap != None) |
1283 | return 0; |
1283 | { |
1284 | |
|
|
1285 | /* straightforward pixmap copy */ |
1284 | /* straightforward pixmap copy */ |
1286 | while (sx < 0) sx += (int)root_width; |
1285 | while (sx < 0) sx += (int)root_width; |
1287 | while (sy < 0) sy += (int)root_height; |
1286 | while (sy < 0) sy += (int)root_height; |
1288 | |
1287 | |
1289 | gcv.tile = recoded_root_pmap; |
1288 | gcv.tile = recoded_root_pmap; |
1290 | gcv.fill_style = FillTiled; |
1289 | gcv.fill_style = FillTiled; |
1291 | gcv.ts_x_origin = -sx; |
1290 | gcv.ts_x_origin = -sx; |
1292 | gcv.ts_y_origin = -sy; |
1291 | gcv.ts_y_origin = -sy; |
1293 | gc = XCreateGC (dpy, vt, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv); |
1292 | gc = XCreateGC (dpy, vt, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv); |
1294 | |
1293 | |
1295 | if (gc) |
1294 | if (gc) |
1296 | { |
1295 | { |
1297 | XFillRectangle (dpy, bg_pixmap, gc, 0, 0, window_width, window_height); |
1296 | XFillRectangle (dpy, bg_pixmap, gc, 0, 0, window_width, window_height); |
1298 | result |= BG_IS_VALID | (bg_flags & BG_EFFECTS_FLAGS); |
1297 | result |= BG_IS_VALID | (bg_flags & BG_EFFECTS_FLAGS); |
1299 | XFreeGC (dpy, gc); |
1298 | XFreeGC (dpy, gc); |
1300 | |
1299 | |
1301 | if (!(bg_flags & BG_CLIENT_RENDER)) |
1300 | if (!(bg_flags & BG_CLIENT_RENDER)) |
1302 | { |
1301 | { |
1303 | if ((bg_flags & BG_NEEDS_BLUR) |
1302 | if ((bg_flags & BG_NEEDS_BLUR) |
1304 | && (bg_flags & BG_HAS_RENDER_CONV)) |
1303 | && (bg_flags & BG_HAS_RENDER_CONV)) |
1305 | { |
1304 | { |
1306 | if (blur_pixmap (bg_pixmap, visual, window_width, window_height)) |
1305 | if (blur_pixmap (bg_pixmap, visual, window_width, window_height)) |
1307 | result &= ~BG_NEEDS_BLUR; |
1306 | result &= ~BG_NEEDS_BLUR; |
1308 | } |
1307 | } |
1309 | if ((bg_flags & BG_NEEDS_TINT) |
1308 | if ((bg_flags & BG_NEEDS_TINT) |
1310 | && (bg_flags & (BG_TINT_BITAND | BG_HAS_RENDER))) |
1309 | && (bg_flags & (BG_TINT_BITAND | BG_HAS_RENDER))) |
1311 | { |
1310 | { |
1312 | if (tint_pixmap (bg_pixmap, visual, window_width, window_height)) |
1311 | if (tint_pixmap (bg_pixmap, visual, window_width, window_height)) |
1313 | result &= ~BG_NEEDS_TINT; |
1312 | result &= ~BG_NEEDS_TINT; |
1314 | } |
1313 | } |
1315 | } /* server side rendering completed */ |
1314 | } /* server side rendering completed */ |
|
|
1315 | } |
1316 | } |
1316 | } |
1317 | |
1317 | |
1318 | if (recoded_root_pmap != root_pixmap) |
1318 | if (recoded_root_pmap != root_pixmap) |
1319 | XFreePixmap (dpy, recoded_root_pmap); |
1319 | XFreePixmap (dpy, recoded_root_pmap); |
1320 | |
1320 | |