Commit 796f3776 authored by Marc Schoechlin's avatar Marc Schoechlin

trivial ident cleanup

parent 069486cb
......@@ -1842,7 +1842,6 @@ rxvt_read_child_cmdfd (rxvt_t* r, int page, unsigned int count)
void
rxvt_monitor_tab(rxvt_t* r,int i)
{
struct timeval tp;
struct timeval monitor_timeout_time;
......@@ -1890,22 +1889,22 @@ rxvt_monitor_tab(rxvt_t* r,int i)
else if ((PVTS(r, i)->monitor_tab == TAB_MON_INACTIVITY) &&
(timercmp(&monitor_timeout_time,&tp, <)))
{
/* inactivity detected */
if (PVTS( r, i)->monitor_nbytes_read == 0)
{
rxvt_msg (DBG_INFO, DBG_MACROS,
"Macro MonitorTab: detected inactivity on tab %i", i);
execute_action = 1;
}
/* activity detected, restarting monitoring */
else
{
rxvt_msg (DBG_DEBUG, DBG_MACROS,
"Macro MonitorTab: NOT detected inactivity on tab %i / %i ",
i, PVTS(r,i)->monitor_nbytes_read);
PVTS(r, i)->monitor_start = tp;
PVTS(r, i)->monitor_nbytes_read = 0 ;
}
/* inactivity detected */
if (PVTS( r, i)->monitor_nbytes_read == 0)
{
rxvt_msg (DBG_INFO, DBG_MACROS,
"Macro MonitorTab: detected inactivity on tab %i", i);
execute_action = 1;
}
/* activity detected, restarting monitoring */
else
{
rxvt_msg (DBG_DEBUG, DBG_MACROS,
"Macro MonitorTab: NOT detected inactivity on tab %i / %i ",
i, PVTS(r,i)->monitor_nbytes_read);
PVTS(r, i)->monitor_start = tp;
PVTS(r, i)->monitor_nbytes_read = 0 ;
}
}
/* monitor-type "ACTIVITY" : detect activity */
else if ((PVTS(r, i)->monitor_tab == TAB_MON_ACTIVITY) &&
......@@ -1916,48 +1915,50 @@ rxvt_monitor_tab(rxvt_t* r,int i)
execute_action = 1;
}
/* perform a action if activity/inactivity was detected */
if (execute_action == 1)
{
/* execute a command if configured */
if( r->h->rs[Rs_monitorCommand] && *r->h->rs[Rs_monitorCommand] )
rxvt_async_exec( r, r->h->rs[Rs_monitorCommand] );
/* stop execution of this function if no activity/inactivity
* needs to be notified
*/
if (execute_action == 0)
return;
/* ding - ring the system bell */
rxvt_scr_bell(r,i);
/* execute a command if configured */
if( r->h->rs[Rs_monitorCommand] && *r->h->rs[Rs_monitorCommand] )
rxvt_async_exec( r, r->h->rs[Rs_monitorCommand] );
/* highlight the tabbar */
rxvt_tabbar_highlight_tab (r, i, False);
/* ding - ring the system bell */
rxvt_scr_bell(r,i);
/* mark tab as active, if it is not the active tab */
if (ATAB(r) != i){
PVTS(r, i)->monitor_tab = TAB_MON_NOTIFICATION;
}
else
{
PVTS(r, i)->monitor_tab = TAB_MON_OFF;
}
/* highlight the tabbar */
rxvt_tabbar_highlight_tab (r, i, False);
#ifdef BACKGROUND_IMAGE
if( r->tabBar.hasPixmap && ISSET_OPTION(r, Opt_tabPixmap))
{
/* mark tab as active, if it is not the active tab */
if (ATAB(r) != i){
PVTS(r, i)->monitor_tab = TAB_MON_NOTIFICATION;
}
else
{
PVTS(r, i)->monitor_tab = TAB_MON_OFF;
rxvt_dbgmsg ((DBG_INFO, DBG_TABBAR,
"Disabling background filling, background image is activated"));
}
}
#ifdef BACKGROUND_IMAGE
if( r->tabBar.hasPixmap && ISSET_OPTION(r, Opt_tabPixmap))
{
PVTS(r, i)->monitor_tab = TAB_MON_OFF;
rxvt_dbgmsg ((DBG_INFO, DBG_TABBAR,
"Disabling background filling, background image is activated"));
}
#endif
#ifdef TRANSPARENT
if ( ( r->h->am_transparent || r->h->am_pixmap_trans ) &&
ISSET_OPTION(r, Opt_transparent_tabbar))
{
PVTS(r, i)->monitor_tab = TAB_MON_OFF;
rxvt_dbgmsg ((DBG_INFO, DBG_TABBAR,
"Disabling background filling, option 'transparentTabbar' is enabled"
));
}
#endif
rxvt_tabbar_expose (r, NULL);
if ( ( r->h->am_transparent || r->h->am_pixmap_trans ) &&
ISSET_OPTION(r, Opt_transparent_tabbar))
{
PVTS(r, i)->monitor_tab = TAB_MON_OFF;
rxvt_dbgmsg ((DBG_INFO, DBG_TABBAR,
"Disabling background filling, option 'transparentTabbar' is enabled"
));
}
#endif
rxvt_tabbar_expose (r, NULL);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment