repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: b6cf660c11a8adaa4bd1a17f73799436e52be79c: path_to: revision_to:
commit b6cf660c11a8adaa4bd1a17f73799436e52be79c Author: Emanuele GiaquintaDate: Sun Jan 23 12:28:47 2011 +0000 Simplify, invert flag meaning. diff --git a/src/background.C b/src/background.C
--- a/src/background.C
+++ b/src/background.C
@@ -1390,7 +1390,7 @@ bgPixmap_t::render ()
if (background_flags == 0)
return false;
else if ((background_flags & transpTransformations) == (flags & transpTransformations))
- flags &= ~isInvalid;
+ flags |= isValid;
}
# endif
@@ -1399,14 +1399,14 @@ bgPixmap_t::render ()
|| (background_flags & transpTransformations) != (flags & transpTransformations))
{
if (render_image (background_flags))
- flags &= ~isInvalid;
+ flags |= isValid;
}
# endif
# if defined(ENABLE_TRANSPARENCY) && !defined(HAVE_AFTERIMAGE)
XImage *result = NULL;
- if (background_flags && (flags & isInvalid))
+ if (background_flags && !(flags & isValid))
{
result = XGetImage (target->dpy, pixmap, 0, 0, pmap_width, pmap_height, AllPlanes, ZPixmap);
}
@@ -1429,14 +1429,14 @@ bgPixmap_t::render ()
XPutImage (target->dpy, pixmap, gc, result, 0, 0, 0, 0, result->width, result->height);
XFreeGC (target->dpy, gc);
- flags &= ~isInvalid;
+ flags |= isValid;
}
XDestroyImage (result);
}
# endif
- if (flags & isInvalid)
+ if (!(flags & isValid))
{
if (pixmap != None)
{
diff --git a/src/background.h b/src/background.h
--- a/src/background.h
+++ b/src/background.h
@@ -39,7 +39,7 @@ struct bgPixmap_t
CLIENT_RENDER = 1 << 14,
isTransparent = 1 << 16,
- isInvalid = 1 << 17,
+ isValid = 1 << 17,
hasChanged = 1 << 19,
sizeSensitive = 1 << 20,
};
@@ -123,7 +123,7 @@ struct bgPixmap_t
bool render ();
void invalidate ()
{
- flags |= isInvalid;
+ flags &= ~isValid;
}
};
#else
diff --git a/src/command.C b/src/command.C
--- a/src/command.C
+++ b/src/command.C
@@ -1466,7 +1466,7 @@ rxvt_term::x_cb (XEvent &ev)
get_window_origin (x, y);
if (bgPixmap.set_position (x, y)
- || (bgPixmap.flags & bgPixmap_t::isInvalid))
+ || !(bgPixmap.flags & bgPixmap_t::isValid))
moved = true;
}
#endif
@@ -1528,7 +1528,7 @@ rxvt_term::x_cb (XEvent &ev)
* We should render background PRIOR to drawing any text, but AFTER all
* of ConfigureNotifys for the best results.
*/
- if (bgPixmap.flags & bgPixmap_t::isInvalid)
+ if (!(bgPixmap.flags & bgPixmap_t::isValid))
update_background_ev.start (0.025);
#endif
mapped = 1;
diff --git a/src/init.C b/src/init.C
--- a/src/init.C
+++ b/src/init.C
@@ -814,7 +814,6 @@ rxvt_term::init (int argc, const char *const *argv, stringvec *envv)
#ifdef HAVE_BG_PIXMAP
{
bgPixmap.set_target (this);
- bgPixmap.invalidate ();
#ifdef ENABLE_TRANSPARENCY
if (option (Opt_transparent))
-----END OF PAGE-----