WISH: tabbed windows (hey, just use screen...)
WISH: just for fun, do shade and tint with XRender.
+ - slow down the internal visual bell (delay by 20ms) and update
+ the terminfo flash code to use the same delay. This is
+ synchronous, so many bells might inhibit screen updates in other
+ windows.
+
5.7 Wed Jul 13 04:46:33 CEST 2005
- implement some useful (hopefully) options for rxvtd.
- separate and improved rxvtc(1) and rxvtd(1) manpages.
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
- flash=\E[?5h$<50/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, ht=^I,
+ flash=\E[?5h$<20/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, ht=^I,
hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L,
ind=^J, is1=\E[?47l\E=\E[?1l,
is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l,
*/
/* #define WAIT_FOR_WM */
+/*
+ * The duration of the visual bell flash in µs. The default of 20ms
+ * corresponds to the delay given in the terminfo flash code.
+ */
+#define VISUAL_BELL_DURATION 20000
+
#endif
case MenuAction:
case MenuTerminalAction:
drawbox_menuitem (this_y, -1);
-#ifdef HAVE_NANOSLEEP
- struct timespec rqt;
-
- rqt.tv_sec = 0;
- rqt.tv_nsec = MENU_DELAY_USEC * 1000;
- nanosleep (&rqt, NULL);
-#else
- /* use select for timing */
- struct timeval tv;
-
- tv.tv_sec = 0;
- tv.tv_usec = MENU_DELAY_USEC;
- select (0, NULL, NULL, NULL, &tv);
-#endif
+ rxvt_usleep (MENU_DELAY_USEC);
/* remove menu before sending keys to the application */
menu_hide_all ();
#ifndef DEBUG_MENU
+ (Width2Pixel (4 * i + i + 4)) / 4))
{
draw_Arrows (Arrows[i].name, -1);
- {
-#ifdef HAVE_NANOSLEEP
- struct timespec rqt;
-
- rqt.tv_sec = 0;
- rqt.tv_nsec = MENU_DELAY_USEC * 1000;
- nanosleep (&rqt, NULL);
-#else
- /* use select for timing */
- struct timeval tv;
-
- tv.tv_sec = 0;
- tv.tv_usec = MENU_DELAY_USEC;
- select (0, NULL, NULL, NULL, &tv);
-#endif
-
- }
+ rxvt_usleep (MENU_DELAY_USEC);
draw_Arrows (Arrows[i].name, +1);
#ifdef DEBUG_MENUARROWS
fprintf (stderr, "'%c': ", Arrows[i].name);
}
}
#endif
+
+// should nto be use din interactive programs, for obvious reasons
+void rxvt_usleep (int usecs)
+{
+#if HAVE_NANOSLEEP
+ struct timespec ts;
+
+ ts.tv_sec = 0;
+ ts.tv_nsec = usecs * 1000;
+ nanosleep (&ts, NULL);
+#else
+ /* use select for timing */
+ struct timeval tv;
+
+ tv.tv_sec = 0;
+ tv.tv_usec = usecs;
+ select (0, NULL, NULL, NULL, &tv);
+#endif
+}
+
/*----------------------- end-of-file (C source) -----------------------*/
+
char * rxvt_File_find (const char *file, const char *ext, const char *path);
void rxvt_Draw_Shadow (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h);
void rxvt_Draw_Triangle (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int type);
+void rxvt_usleep (int usecs);
/*
*****************************************************************************
int fd = XConnectionNumber (display);
#ifndef NO_SLOW_LINK_SUPPORT
- // try to detetc wether we have a local connection.
+ // try to detect wether we have a local connection.
// assume unix domains socket == local, everything else not
// TODO: might want to check for inet/127.0.0.1
is_local = 0;
rxvt_term::scr_bell ()
{
#ifndef NO_BELL
+
# ifndef NO_MAPALERT
# ifdef MAPALERT_OPTION
if (options & Opt_mapAlert)
# endif
XMapWindow (display->display, TermWin.parent[0]);
# endif
+
if (options & Opt_visualBell)
{
scr_rvideo_mode (!rvideo); /* refresh also done */
+ rxvt_usleep (VISUAL_BELL_DURATION);
scr_rvideo_mode (!rvideo); /* refresh also done */
}
else
XBell (display->display, 0);
+
#endif
}