… | |
… | |
348 | else |
348 | else |
349 | w = h; |
349 | w = h; |
350 | } |
350 | } |
351 | } /* done parsing geometry string */ |
351 | } /* done parsing geometry string */ |
352 | else if (!(flags & geometrySet)) |
352 | else if (!(flags & geometrySet)) |
|
|
353 | { |
353 | { /* default geometry - scaled and centered */ |
354 | /* default geometry - scaled and centered */ |
354 | x = y = defaultAlign; |
355 | x = y = defaultAlign; |
355 | w = h = defaultScale; |
356 | w = h = defaultScale; |
356 | } |
357 | } |
357 | |
358 | |
358 | if (!(flags & geometrySet)) |
359 | if (!(flags & geometrySet)) |
… | |
… | |
861 | |
862 | |
862 | if (tiled_root_pmap == None) /* something really bad happened - abort */ |
863 | if (tiled_root_pmap == None) /* something really bad happened - abort */ |
863 | return 0; |
864 | return 0; |
864 | |
865 | |
865 | if (root_pixmap == None) |
866 | if (root_pixmap == None) |
|
|
867 | { |
866 | { /* use tricks to obtain the root background image :*/ |
868 | /* use tricks to obtain the root background image :*/ |
867 | /* we want to create Overrideredirect window overlapping out window |
869 | /* we want to create Overrideredirect window overlapping out window |
868 | with background type of Parent Relative and then grab it */ |
870 | with background type of Parent Relative and then grab it */ |
869 | XSetWindowAttributes attr; |
871 | XSetWindowAttributes attr; |
870 | Window src; |
872 | Window src; |
871 | bool success = false; |
873 | bool success = false; |
… | |
… | |
891 | * but to be on the safe side - let's check for the actuall event to arrive : */ |
893 | * but to be on the safe side - let's check for the actuall event to arrive : */ |
892 | while (XCheckWindowEvent (dpy, src, ExposureMask, &event)) |
894 | while (XCheckWindowEvent (dpy, src, ExposureMask, &event)) |
893 | ++ev_count; |
895 | ++ev_count; |
894 | |
896 | |
895 | if (ev_count > 0); |
897 | if (ev_count > 0); |
|
|
898 | { |
896 | { /* hooray! - we can grab the image! */ |
899 | /* hooray! - we can grab the image! */ |
897 | gc = XCreateGC (dpy, root, 0, NULL); |
900 | gc = XCreateGC (dpy, root, 0, NULL); |
898 | if (gc) |
901 | if (gc) |
899 | { |
902 | { |
900 | XCopyArea (dpy, src, tiled_root_pmap, gc, 0, 0, window_width, window_height, 0, 0); |
903 | XCopyArea (dpy, src, tiled_root_pmap, gc, 0, 0, window_width, window_height, 0, 0); |
901 | success = true; |
904 | success = true; |
… | |
… | |
1186 | pmap_width = result->width; |
1189 | pmap_width = result->width; |
1187 | pmap_height = result->height; |
1190 | pmap_height = result->height; |
1188 | pmap_depth = target->depth; |
1191 | pmap_depth = target->depth; |
1189 | } |
1192 | } |
1190 | if (pmap_depth != result->depth) |
1193 | if (pmap_depth != result->depth) |
|
|
1194 | { |
1191 | { /* Bad Match error will ensue ! stupid X !!!! */ |
1195 | /* Bad Match error will ensue ! stupid X !!!! */ |
1192 | if( result->depth == 24 && pmap_depth == 32) |
1196 | if( result->depth == 24 && pmap_depth == 32) |
1193 | result->depth = 32; |
1197 | result->depth = 32; |
1194 | else if( result->depth == 32 && pmap_depth == 24) |
1198 | else if( result->depth == 32 && pmap_depth == 24) |
1195 | result->depth = 24; |
1199 | result->depth = 24; |
1196 | else |
1200 | else |
… | |
… | |
1242 | { |
1246 | { |
1243 | if (target) |
1247 | if (target) |
1244 | { |
1248 | { |
1245 | flags &= ~isVtOrigin; |
1249 | flags &= ~isVtOrigin; |
1246 | if (pixmap != None) |
1250 | if (pixmap != None) |
|
|
1251 | { |
1247 | { /* set target's background to pixmap */ |
1252 | /* set target's background to pixmap */ |
1248 | # ifdef ENABLE_TRANSPARENCY |
1253 | # ifdef ENABLE_TRANSPARENCY |
1249 | if (flags & isTransparent) |
1254 | if (flags & isTransparent) |
1250 | { |
1255 | { |
1251 | XSetWindowBackgroundPixmap (target->dpy, target->parent[0], pixmap); |
1256 | XSetWindowBackgroundPixmap (target->dpy, target->parent[0], pixmap); |
1252 | XSetWindowBackgroundPixmap (target->dpy, target->vt, ParentRelative); |
1257 | XSetWindowBackgroundPixmap (target->dpy, target->vt, ParentRelative); |
… | |
… | |
1268 | XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]); |
1273 | XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]); |
1269 | # endif |
1274 | # endif |
1270 | } |
1275 | } |
1271 | } |
1276 | } |
1272 | else |
1277 | else |
|
|
1278 | { |
1273 | { /* set target background to a pixel */ |
1279 | /* set target background to a pixel */ |
1274 | XSetWindowBackground (target->dpy, target->parent[0], target->pix_colors[Color_border]); |
1280 | XSetWindowBackground (target->dpy, target->parent[0], target->pix_colors[Color_border]); |
1275 | XSetWindowBackground (target->dpy, target->vt, target->pix_colors[Color_bg]); |
1281 | XSetWindowBackground (target->dpy, target->vt, target->pix_colors[Color_bg]); |
1276 | /* do we also need to set scrollbar's background here ? */ |
1282 | /* do we also need to set scrollbar's background here ? */ |
1277 | # if HAVE_SCROLLBARS |
1283 | # if HAVE_SCROLLBARS |
1278 | if (target->scrollBar.win) |
1284 | if (target->scrollBar.win) |