WISH: look into XAddConnectionWatch, does anybody need that?
DUMB: support tex fonts
-TODO: weird flicker after changing backgorund pixmap
- Esetroot some image
- rxvt -ip -sh 50 -tint blue
- Esetroot some image again
- resizing the window now shows flashes of untinted pixmap (metacity)
-
- fix the issue where urxvtd would not immediately close a window
when the command exited but only on the next X event.
- fix the issue where making a selection in one urxvtd window
would not clear it visually in another.
- changed terminfo file not to use application keypad mode.
+ - fix an issue of urxvt not getting background pixmap updates
+ and flickering after bg pixmap changes.
- fix redraw bug in xterm scrollbar with -sr (reported by Mikachu).
- correctly provide dependencies for libev (µikachu).
- minor code reorganisations and cleanups.
flags = (flags & ~tintFlags) | new_flags | tintSet;
return true;
}
+
return false;
}
flags = (flags&~tintFlags)|new_flags;
return true;
}
+
return false;
}
int new_shade = (shade_str) ? atoi (shade_str) : 0;
if (new_shade < 0 && new_shade > -100)
- new_shade = 200 - (100 + new_shade);
+ new_shade = 200 - (100 + new_shade);
else if (new_shade == 100)
new_shade = 0;
flags = (flags & (~tintFlags | tintSet)) | new_flags;
return true;
}
+
return false;
}
success = true;
}
}
+
XDestroyWindow (dpy, src);
XUngrabServer (dpy);
//fprintf (stderr, "%s:%d: ev_count = %d\n", __FUNCTION__, __LINE__, ev_count);
XRenderComposite (dpy, PictOpOver, overlay_pic, mask_pic, back_pic, 0, 0, 0, 0, 0, 0, window_width, window_height);
result |= transpPmapTinted;
}
+
XRenderFreePicture (dpy, mask_pic);
XRenderFreePicture (dpy, overlay_pic);
XRenderFreePicture (dpy, back_pic);
bool
bgPixmap_t::set_root_pixmap ()
{
- Pixmap new_root_pixmap = None;
-
- new_root_pixmap = target->get_pixmap_property (XA_XROOTPMAP_ID);
+ Pixmap new_root_pixmap = target->get_pixmap_property (XA_XROOTPMAP_ID);
if (new_root_pixmap == None)
new_root_pixmap = target->get_pixmap_property (XA_ESETROOT_PMAP_ID);
root_pixmap = new_root_pixmap;
return true;
}
+
return false;
}
# endif /* ENABLE_TRANSPARENCY */
static void ShadeXImage(rxvt_term *term, XImage* srcImage, int shade, int rm, int gm, int bm);
# endif
-
bool
bgPixmap_t::render ()
{
}
# endif /* HAVE_AFTERIMAGE */
- if (result != NULL)
+ if (result)
{
GC gc = XCreateGC (target->dpy, target->vt, 0UL, NULL);
+
if (gc)
{
if (/*pmap_depth != target->depth &&*/ pixmap != None)
XFreePixmap (target->dpy, pixmap);
pixmap = None;
}
+
if (pixmap == None)
{
pixmap = XCreatePixmap (target->dpy, target->vt, result->width, result->height, target->depth);
- pmap_width = result->width;
+ pmap_width = result->width;
pmap_height = result->height;
- pmap_depth = target->depth;
+ pmap_depth = target->depth;
}
+
if (pmap_depth != result->depth)
{
/* Bad Match error will ensue ! stupid X !!!! */
/* TODO: implement image recoding */
}
}
+
if (pmap_depth == result->depth)
XPutImage (target->dpy, pixmap, gc, result, 0, 0, 0, 0, result->width, result->height);
+
XFreeGC (target->dpy, gc);
flags = flags & ~isInvalid;
}
+
XDestroyImage (result);
}
}
void
-bgPixmap_t::apply()
+bgPixmap_t::apply ()
{
if (target)
{
update_background ();
#endif
}
+
HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END));
}
break;
bgPixmap.set_root_pixmap ();
update_background ();
}
+
break;
}
# endif
process_color_seq (op, Color_tint, str, resp);
{
bool changed = false;
+
if (ISSET_PIXCOLOR (Color_tint))
changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]);
else
changed = bgPixmap.unset_tint ();
+
if (changed)
update_background ();
}
if (str == NULL)
bgPixmap.set_defaultGeometry ();
}
+
while (str)
{
str++;
changed++;
str = strchr (str, ';');
}
+
if (changed)
- update_background ();
+ update_background ();
}
break;
#endif
slip_wheel_ev.set <rxvt_term, &rxvt_term::slip_wheel_cb> (this);
#endif
#if ENABLE_TRANSPARENCY || ENABLE_PERL
- rootwin_ev.set <rxvt_term, &rxvt_term::x_cb> (this),
+ rootwin_ev.set <rxvt_term, &rxvt_term::rootwin_cb> (this),
#endif
#ifdef HAVE_SCROLLBARS
scrollbar_ev.set <rxvt_term, &rxvt_term::x_cb> (this),
if (option (Opt_transparent))
{
bgPixmap.set_transparent ();
+
#ifdef HAVE_AFTERIMAGE
if (rs [Rs_blurradius])
bgPixmap.set_blur_radius (rs [Rs_blurradius]);
#endif
if (ISSET_PIXCOLOR (Color_tint))
bgPixmap.set_tint (pix_colors_focused [Color_tint]);
+
if (rs [Rs_shade])
bgPixmap.set_shade (rs [Rs_shade]);
#endif
#ifdef BG_IMAGE_FROM_FILE
- if (rs[Rs_backgroundPixmap] != NULL)
+ if (rs[Rs_backgroundPixmap])
{
const char *p = rs[Rs_backgroundPixmap];
- if ((p = strchr (p, ';')) != NULL)
+ if ((p = strchr (p, ';')) != 0)
{
p++;
bgPixmap.set_geometry (p);
#ifdef HAVE_BG_PIXMAP
# if TRACE_PIXMAPS
# undef update_background
-int rxvt_term::trace_update_background (const char *file, int line)
+void
+rxvt_term::trace_update_background (const char *file, int line)
{
fprintf (stderr, "%s:%d:update_background()\n", file, line);
update_background ();
}
# endif
-int
+void
rxvt_term::update_background ()
{
bgPixmap.invalidate ();
/* no chance of real time refresh if we are blurring! */
- if (bgPixmap.invalid_since + 0.5 < ev::now () && !(bgPixmap.flags & bgPixmap_t::blurNeeded))
- bgPixmap.render ();
+ if (bgPixmap.invalid_since + 0.50 < ev::now ()
+ && !(bgPixmap.flags & bgPixmap_t::blurNeeded))
+ {
+ update_background_ev.stop ();
+ bgPixmap.render ();
+ }
else
{
ev_tstamp refresh;
- update_background_ev.stop ();
if (!bgPixmap.need_client_side_rendering ())
refresh = .05;
refresh = .20; /* very slow !!! */
else
refresh = .07;
+
update_background_ev.start (refresh);
}
-
- return 0;
}
void
xevent_watcher rootwin_ev;
#endif
#ifdef HAVE_BG_PIXMAP
- int update_background ();
+ void update_background ();
#if TRACE_PIXMAPS
- int trace_update_background (const char *file, int line);
+ void trace_update_background (const char *file, int line);
# define update_background() trace_update_background (__FILE__, __LINE__)
#endif
void update_background_cb (ev::timer &w, int revents);