TODO: artificially enlargen wide characters at end to correctly cut&paste.
TODO: cursor over overlays, when focus change?
-TODO: focus leave == reset urgent hint?
- remove bogus "setuid/setgid security issues" from rxvt.1.pod, they
no longer apply.
+ - the urgency hint is now cleared on both focus in and focus out.
+ - cache urgency hint locally to avoid server rtt on every focus change.
- perl 5.10 needs PERL_SYS_INIT3 on hppa.
- ignore byte-order marks and do not treat them like combining characters.
- fix build issue when CURSOR_BLINK is not defined (Emanuele Giaquinta).
B<True>: set the urgency hint for the wm on receipt of a bell character.
B<False>: do not set the urgency hint [default].
+@@RXVT_NAME@@ resets the urgency hint on every focus change.
+
=item B<visualBell:> I<boolean>
B<True>: use visual bell on receipt of a bell character; option B<-vb>.
}
void
+rxvt_term::set_urgency (bool enable)
+{
+ if (enable == urgency_hint)
+ return;
+
+ if (XWMHints *h = XGetWMHints (dpy, parent[0]))
+ {
+ h->flags = h->flags & ~XUrgencyHint | (enable ? XUrgencyHint : 0);
+ XSetWMHints (dpy, parent[0], h);
+ urgency_hint = enable;
+ }
+}
+
+void
rxvt_term::focus_in ()
{
if (!focus)
focus = 1;
want_refresh = 1;
- HOOK_INVOKE ((this, HOOK_FOCUS_IN, DT_END));
-
#if USE_XIM
if (Input_Context != NULL)
{
#endif
#if ENABLE_FRILLS
if (option (Opt_urgentOnBell))
- {
- if (XWMHints *h = XGetWMHints(dpy, parent[0]))
- {
- h->flags &= ~XUrgencyHint;
- XSetWMHints (dpy, parent[0], h);
- }
- }
+ set_urgency (0);
#endif
+
+ HOOK_INVOKE ((this, HOOK_FOCUS_IN, DT_END));
}
}
focus = 0;
want_refresh = 1;
- HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END));
-
+#if ENABLE_FRILLS
+ if (option (Opt_urgentOnBell))
+ set_urgency (0);
+#endif
#if ENABLE_FRILLS || ISO_14755
if (iso14755buf)
{
scr_recolour ();
}
#endif
+
+ HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END));
}
}
current_screen:1, /* primary or secondary */
num_scr_allow:1,
bypass_keystate:1,
+#ifdef ENABLE_FRILLS
+ urgency_hint:1,
+#endif
#ifdef CURSOR_BLINK
hidden_cursor:1,
#endif
void button_release (XButtonEvent &ev);
void focus_in ();
void focus_out ();
+ void set_urgency (bool enable);
void update_fade_color (unsigned int idx);
#ifdef PRINTPIPE
FILE *popen_printer ();
# if ENABLE_FRILLS
if (option (Opt_urgentOnBell))
- {
- if (XWMHints *h = XGetWMHints(dpy, parent[0]))
- {
- h->flags |= XUrgencyHint;
- XSetWMHints (dpy, parent[0], h);
- }
- }
+ set_urgency (1);
# endif
if (option (Opt_visualBell))