ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/background.C
(Generate patch)

Comparing rxvt-unicode/src/background.C (file contents):
Revision 1.130 by sf-exg, Sun Jan 9 23:48:37 2011 UTC vs.
Revision 1.132 by sf-exg, Mon Jan 10 20:46:20 2011 UTC

175# endif 175# endif
176 176
177 return false; 177 return false;
178} 178}
179 179
180bool bgPixmap_t::need_client_side_rendering ()
181{
182# ifdef HAVE_AFTERIMAGE
183 if (original_asim)
184 return true;
185# endif
186 return false;
187}
188
189# ifdef BG_IMAGE_FROM_FILE 180# ifdef BG_IMAGE_FROM_FILE
190static inline bool 181static inline bool
191check_set_scale_value (int geom_flags, int flag, unsigned int &scale, unsigned int new_value) 182check_set_scale_value (int geom_flags, int flag, unsigned int &scale, unsigned int new_value)
192{ 183{
193 if (geom_flags & flag) 184 if (geom_flags & flag)
307 geom_flags |= WidthValue|HeightValue|XValue|YValue; 298 geom_flags |= WidthValue|HeightValue|XValue|YValue;
308 } 299 }
309 300
310 if (ops) 301 if (ops)
311 { 302 {
312 while (*ops) 303 char **arr = rxvt_strsplit (':', ops + 1);
313 {
314 while (*ops == ':' || isspace(*ops)) ++ops;
315 304
305 for (int i = 0; arr[i]; i++)
306 {
316# define CHECK_GEOM_OPS(op_str) (strncasecmp (ops, (op_str), sizeof (op_str) - 1) == 0) 307# define CHECK_GEOM_OPS(op_str) (strcasecmp (arr[i], (op_str)) == 0)
317 if (CHECK_GEOM_OPS ("tile")) 308 if (CHECK_GEOM_OPS ("tile"))
318 { 309 {
319 w = h = noScale; 310 w = h = noScale;
320 geom_flags |= WidthValue|HeightValue; 311 geom_flags |= WidthValue|HeightValue;
321 } 312 }
355 new_flags |= rootAlign; 346 new_flags |= rootAlign;
356 w = h = noScale; 347 w = h = noScale;
357 geom_flags |= WidthValue|HeightValue; 348 geom_flags |= WidthValue|HeightValue;
358 } 349 }
359# undef CHECK_GEOM_OPS 350# undef CHECK_GEOM_OPS
360
361 while (*ops != ':' && *ops != '\0') ++ops;
362 } /* done parsing ops */ 351 } /* done parsing ops */
352
353 rxvt_free_strsplit (arr);
363 } 354 }
364 355
365 if (check_set_scale_value (geom_flags, WidthValue, h_scale, w)) changed = true; 356 if (check_set_scale_value (geom_flags, WidthValue, h_scale, w)) changed = true;
366 if (check_set_scale_value (geom_flags, HeightValue, v_scale, h)) changed = true; 357 if (check_set_scale_value (geom_flags, HeightValue, v_scale, h)) changed = true;
367 if (check_set_align_value (geom_flags, XValue, h_align, x)) changed = true; 358 if (check_set_align_value (geom_flags, XValue, h_align, x)) changed = true;
940 if (image) 931 if (image)
941 { 932 {
942 if (original_asim) 933 if (original_asim)
943 safe_asimage_destroy (original_asim); 934 safe_asimage_destroy (original_asim);
944 original_asim = image; 935 original_asim = image;
936 flags |= CLIENT_RENDER;
945 have_image = true; 937 have_image = true;
946 return true; 938 return true;
947 } 939 }
948# endif 940# endif
949 941
1363 { 1355 {
1364 XFillRectangle (dpy, tiled_root_pmap, gc, 0, 0, window_width, window_height); 1356 XFillRectangle (dpy, tiled_root_pmap, gc, 0, 0, window_width, window_height);
1365 result |= transpPmapTiled; 1357 result |= transpPmapTiled;
1366 XFreeGC (dpy, gc); 1358 XFreeGC (dpy, gc);
1367 1359
1368 if (!need_client_side_rendering ()) 1360 if (!(flags & CLIENT_RENDER))
1369 { 1361 {
1370 if ((flags & blurNeeded) 1362 if ((flags & blurNeeded)
1371 && (flags & HAS_RENDER_CONV)) 1363 && (flags & HAS_RENDER_CONV))
1372 { 1364 {
1373 if (blur_pixmap (tiled_root_pmap, target->visual, window_width, window_height)) 1365 if (blur_pixmap (tiled_root_pmap, target->visual, window_width, window_height))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines