--- rxvt-unicode/src/background.h 2010/09/08 22:17:06 1.21 +++ rxvt-unicode/src/background.h 2010/11/18 17:28:12 1.36 @@ -23,24 +23,24 @@ void destroy (); enum { - geometrySet = 1 << 0, propScale = 1 << 1, - geometryFlags = geometrySet | propScale, + rootAlign = 1 << 2, + geometryFlags = propScale | rootAlign, tintSet = 1 << 8, tintNeeded = 1 << 9, tintWholesome = 1 << 10, - tintServerSide = 1 << 11, - tintFlags = tintSet | tintServerSide | tintNeeded | tintWholesome, + tintFlags = tintSet | tintNeeded | tintWholesome, - blurNeeded = 1 << 12, - blurServerSide = 1 << 13, /* this doesn't work yet */ + blurNeeded = 1 << 11, + + HAS_RENDER = 1 << 12, + HAS_RENDER_CONV = 1 << 13, isTransparent = 1 << 16, isInvalid = 1 << 17, - isVtOrigin = 1 << 18, /* if set pixmap has origin at corner of - vt window instead of parent[0]! */ hasChanged = 1 << 19, + sizeSensitive = 1 << 20, }; unsigned int flags; @@ -48,17 +48,10 @@ enum { transpPmapTiled = 1 << 0, transpPmapTinted = tintNeeded, - transpPmapBlured = blurNeeded, + transpPmapBlurred = blurNeeded, transpTransformations = tintNeeded | blurNeeded, }; /* these flags are returned by make_transparency_pixmap if called */ - bool check_clearChanged () - { - bool r = flags & hasChanged; - flags &= ~hasChanged; - return r; - }; - # ifdef BG_IMAGE_FROM_FILE # ifdef HAVE_AFTERIMAGE ASImage *original_asim; @@ -78,32 +71,25 @@ defaultScale = windowScale, centerAlign = 50, defaultAlign = centerAlign, - rootAlign = -10000 }; unsigned int h_scale, v_scale;/* percents of the window size */ int h_align, v_align; /* percents of the window size: 0 - left align, 50 - center, 100 - right */ - void unset_geometry () - { - flags = flags & ~geometryFlags; - }; - bool set_geometry (const char *geom); + bool set_geometry (const char *geom, bool update = false); void set_defaultGeometry () { h_scale = v_scale = defaultScale; h_align = v_align = defaultAlign; - flags |= geometrySet; - }; + } bool set_file (const char *file); # endif /* BG_IMAGE_FROM_FILE */ rxvt_term *target; - bool set_target (rxvt_term *new_target); + void set_target (rxvt_term *new_target); # ifdef ENABLE_TRANSPARENCY - int root_depth; /* obtained when target is set */ Pixmap root_pixmap; /* current root pixmap set */ rxvt_color tint; int shade; @@ -114,7 +100,9 @@ bool set_tint (rxvt_color &new_tint); bool unset_tint (); bool set_shade (const char *shade_str); - bool set_root_pixmap (); + bool blur_pixmap (Pixmap pixmap, Visual *visual, int width, int height); + bool tint_pixmap (Pixmap pixmap, Visual *visual, int width, int height); + void set_root_pixmap (); unsigned long make_transparency_pixmap ();/* returns combination of the transpTransformations flags */ # endif @@ -127,11 +115,6 @@ bool window_size_sensitive (); bool window_position_sensitive (); - bool is_parentOrigin () - { - return !(flags & isVtOrigin); - }; - bool need_client_side_rendering (); void apply (); bool render (); @@ -142,7 +125,7 @@ flags |= isInvalid; invalid_since = ev::now (); } - }; + } }; #else # undef HAVE_BG_PIXMAP