From: Daniel Hahler <[email protected]>
---
doc/rxvt.7.pod | 4 ++--
src/command.C | 7 +++++++
src/rxvt.h | 1 +
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/doc/rxvt.7.pod b/doc/rxvt.7.pod
index e39908f..350bea9 100644
--- a/doc/rxvt.7.pod
+++ b/doc/rxvt.7.pod
@@ -1934,12 +1934,12 @@ X<Priv66>
=end table
-=item B<< C<Pm = 1004> >> (X11 XTerm focus in/focus out events)
I<unimplemented>
+=item B<< C<Pm = 1004> >> (X11 XTerm focus in/focus out events)
=begin table
B<< C<h> >> Send Mouse focus in/focus out events.
- B<< C<l> >> Don'T send focus events.
+ B<< C<l> >> Don't send focus events.
=end table
diff --git a/src/command.C b/src/command.C
index 7b79f51..6b895ca 100644
--- a/src/command.C
+++ b/src/command.C
@@ -1791,6 +1791,9 @@ rxvt_term::focus_in ()
set_urgency (0);
#endif
+ if (priv_modes & PrivMode_FocusReporting)
+ tt_printf ("\x1b[I");
+
HOOK_INVOKE ((this, HOOK_FOCUS_IN, DT_END));
}
}
@@ -1834,6 +1837,9 @@ rxvt_term::focus_out ()
}
#endif
+ if (priv_modes & PrivMode_FocusReporting)
+ tt_printf ("\x1b[O");
+
HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END));
}
}
@@ -3708,6 +3714,7 @@ rxvt_term::process_terminal_mode (int mode, int priv
ecb_unused, unsigned int na
{ 1000, PrivMode_MouseX11 },
{ 1002, PrivMode_MouseBtnEvent },
{ 1003, PrivMode_MouseAnyEvent },
+ { 1004, PrivMode_FocusReporting },
#if ENABLE_FRILLS
{ 1005, PrivMode_ExtModeMouse },
#endif
diff --git a/src/rxvt.h b/src/rxvt.h
index 5c7cf66..4f433ee 100644
--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -645,6 +645,7 @@ enum {
#define PrivMode_ExtModeMouse (1UL<<23) // xterm pseudo-utf-8 hack
#define PrivMode_ExtMouseRight (1UL<<24) // xterm pseudo-utf-8, but works in
non-utf-8-locales
#define PrivMode_BlinkingCursor (1UL<<25)
+#define PrivMode_FocusReporting (1UL<<26)
#define PrivMode_mouse_report
(PrivMode_MouseX10|PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent)
--
2.8.2
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/rxvt-unicode