Revision: 2665
          http://tmux.svn.sourceforge.net/tmux/?rev=2665&view=rev
Author:   tcunha
Date:     2012-01-21 19:30:07 +0000 (Sat, 21 Jan 2012)
Log Message:
-----------
Sync OpenBSD patchset 1003:

Only hide flags on the current window when the session is attached, from
Roland Walker.

Modified Paths:
--------------
    trunk/cmd-attach-session.c
    trunk/cmd-switch-client.c
    trunk/server-window.c

Modified: trunk/cmd-attach-session.c
===================================================================
--- trunk/cmd-attach-session.c  2012-01-20 21:21:32 UTC (rev 2664)
+++ trunk/cmd-attach-session.c  2012-01-21 19:30:07 UTC (rev 2665)
@@ -76,6 +76,7 @@
                ctx->curclient->session = s;
                session_update_activity(s);
                server_redraw_client(ctx->curclient);
+               s->curw->flags &= ~WINLINK_ALERTFLAGS;
        } else {
                if (!(ctx->cmdclient->flags & CLIENT_TERMINAL)) {
                        ctx->error(ctx, "not a terminal");
@@ -104,6 +105,7 @@
                environ_update(update, &ctx->cmdclient->environ, &s->environ);
 
                server_redraw_client(ctx->cmdclient);
+               s->curw->flags &= ~WINLINK_ALERTFLAGS;
        }
        recalculate_sizes();
        server_update_socket();

Modified: trunk/cmd-switch-client.c
===================================================================
--- trunk/cmd-switch-client.c   2012-01-20 21:21:32 UTC (rev 2664)
+++ trunk/cmd-switch-client.c   2012-01-21 19:30:07 UTC (rev 2665)
@@ -108,6 +108,7 @@
        recalculate_sizes();
        server_check_unattached();
        server_redraw_client(c);
+       s->curw->flags &= ~WINLINK_ALERTFLAGS;
 
        return (0);
 }

Modified: trunk/server-window.c
===================================================================
--- trunk/server-window.c       2012-01-20 21:21:32 UTC (rev 2664)
+++ trunk/server-window.c       2012-01-21 19:30:07 UTC (rev 2665)
@@ -56,8 +56,10 @@
                                server_status_session(s);
                        TAILQ_FOREACH(wp, &w->panes, entry)
                                server_window_check_content(s, wl, wp);
+
+                       if (!(s->flags & SESSION_UNATTACHED))
+                               w->flags &= ~(WINDOW_BELL|WINDOW_ACTIVITY);
                }
-               w->flags &= ~(WINDOW_BELL|WINDOW_ACTIVITY);
        }
 }
 
@@ -72,7 +74,7 @@
 
        if (!(w->flags & WINDOW_BELL) || wl->flags & WINLINK_BELL)
                return (0);
-       if (s->curw != wl)
+       if (s->curw != wl || s->flags & SESSION_UNATTACHED)
                wl->flags |= WINLINK_BELL;
 
        action = options_get_number(&s->options, "bell-action");
@@ -129,7 +131,7 @@
 
        if (!(w->flags & WINDOW_ACTIVITY) || wl->flags & WINLINK_ACTIVITY)
                return (0);
-       if (s->curw == wl)
+       if (s->curw == wl && !(s->flags & SESSION_UNATTACHED))
                return (0);
 
        if (!options_get_number(&w->options, "monitor-activity"))
@@ -165,7 +167,7 @@
        if (!(w->flags & WINDOW_SILENCE) || wl->flags & WINLINK_SILENCE)
                return (0);
 
-       if (s->curw == wl) {
+       if (s->curw == wl && !(s->flags & SESSION_UNATTACHED)) {
                /*
                 * Reset the timer for this window if we've focused it.  We
                 * don't want the timer tripping as soon as we've switched away
@@ -217,7 +219,7 @@
        /* Activity flag must be set for new content. */
        if (!(w->flags & WINDOW_ACTIVITY) || wl->flags & WINLINK_CONTENT)
                return (0);
-       if (s->curw == wl)
+       if (s->curw == wl && !(s->flags & SESSION_UNATTACHED))
                return (0);
 
        ptr = options_get_string(&w->options, "monitor-content");

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to