Can you please drop the handling of focus events from outside tmux for now and just concentrate on those from inside? It is more complicated than it appears - what if a pane is active in sessions attached to two terminals?
I suggest for now tmux explicitly turns this off if XT is present with \033[?1004l. If you want to support it later, sure, but let's get the internal focus when tmux changes it's pane sorted out first because you will need them anyway. You firstly need to change these window pane flags to be screen mode flags, I don't see any reason for these to be window pane flags and in fact you will want the focus to be switched away and back when you enter a window mode for which screen mode flags are better. I suggest two flags, such as MODE_FOCUSON and MODE_FOCUSED, the first when the application has sent SM ?1004 and the second when tmux has sent an \033[I to the pane already. On Thu, Feb 21, 2013 at 07:49:34AM +0000, Nicholas Marriott wrote: > Are you telling me that in iterm these are on by default? Even if tmux > or the user doesn't ask for them? > > > > > On Wed, Feb 20, 2013 at 04:42:01PM -0800, Aaron Jensen wrote: > > On Wednesday, February 20, 2013 at 3:56 PM, Aaron Jensen wrote: > > > > On Wed, Feb 20, 2013 at 3:36 PM, Nicholas Marriott > > <[1]nicholas.marri...@gmail.com> wrote: > > > > I will look at the diff tomorrow, but I don't see why we need an > > option. > > > > If you enable focusing in your terminal, you'll get it in tmux (if > > the > > application has turned it on). That's what you want, right? > > > > From akracun: > > > > "The filter-focus option is to ensure backwards compatibility. There > > must be some user who actually wants these iTerm focus lost/gained > > messages to pass through, as they did before our patches, without > > having > > to discover a feature that we haven't even documented yet." > > > > He also encouraged me to add back in some code to remember the state of > > panes (whether or not they are focused) in order to prevent double focus > > notifications in some situations (like break-pane): > > > > "You should keep the has_focus member variable to avoid double > > notification of focus gained messages. This was added specifically to > > address the cmd-break-pane issue where if the pane that has_focus is > > detached and the -d option is not given, it will receive another focus > > gained message." > > > > My thought was that there may be commands we missed that changed focus > > and > > therefore got the panes into incorrect states. I'm not sure which is a > > bigger bug, not sending focus notifications when we should, or sending > > them redundantly. For the break-pane situation, for example, if we know > > that that does send redundant notifications, we can just fix that > > situation rather than adding the state + check. > > Aaron > > > > References > > > > Visible links > > 1. mailto:nicholas.marri...@gmail.com ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users