… | |
… | |
1683 | |
1683 | |
1684 | refresh_check (); |
1684 | refresh_check (); |
1685 | } |
1685 | } |
1686 | |
1686 | |
1687 | void |
1687 | void |
|
|
1688 | rxvt_term::set_urgency (bool enable) |
|
|
1689 | { |
|
|
1690 | if (enable == urgency_hint) |
|
|
1691 | return; |
|
|
1692 | |
|
|
1693 | if (XWMHints *h = XGetWMHints (dpy, parent[0])) |
|
|
1694 | { |
|
|
1695 | h->flags = h->flags & ~XUrgencyHint | (enable ? XUrgencyHint : 0); |
|
|
1696 | XSetWMHints (dpy, parent[0], h); |
|
|
1697 | urgency_hint = enable; |
|
|
1698 | } |
|
|
1699 | } |
|
|
1700 | |
|
|
1701 | void |
1688 | rxvt_term::focus_in () |
1702 | rxvt_term::focus_in () |
1689 | { |
1703 | { |
1690 | if (!focus) |
1704 | if (!focus) |
1691 | { |
1705 | { |
1692 | focus = 1; |
1706 | focus = 1; |
1693 | want_refresh = 1; |
1707 | want_refresh = 1; |
1694 | |
|
|
1695 | HOOK_INVOKE ((this, HOOK_FOCUS_IN, DT_END)); |
|
|
1696 | |
1708 | |
1697 | #if USE_XIM |
1709 | #if USE_XIM |
1698 | if (Input_Context != NULL) |
1710 | if (Input_Context != NULL) |
1699 | { |
1711 | { |
1700 | IMSetPosition (); |
1712 | IMSetPosition (); |
… | |
… | |
1712 | scr_recolour (); |
1724 | scr_recolour (); |
1713 | } |
1725 | } |
1714 | #endif |
1726 | #endif |
1715 | #if ENABLE_FRILLS |
1727 | #if ENABLE_FRILLS |
1716 | if (option (Opt_urgentOnBell)) |
1728 | if (option (Opt_urgentOnBell)) |
1717 | { |
1729 | set_urgency (0); |
1718 | if (XWMHints *h = XGetWMHints(dpy, parent[0])) |
|
|
1719 | { |
|
|
1720 | h->flags &= ~XUrgencyHint; |
|
|
1721 | XSetWMHints (dpy, parent[0], h); |
|
|
1722 | } |
|
|
1723 | } |
|
|
1724 | #endif |
1730 | #endif |
|
|
1731 | |
|
|
1732 | HOOK_INVOKE ((this, HOOK_FOCUS_IN, DT_END)); |
1725 | } |
1733 | } |
1726 | } |
1734 | } |
1727 | |
1735 | |
1728 | void |
1736 | void |
1729 | rxvt_term::focus_out () |
1737 | rxvt_term::focus_out () |
… | |
… | |
1731 | if (focus) |
1739 | if (focus) |
1732 | { |
1740 | { |
1733 | focus = 0; |
1741 | focus = 0; |
1734 | want_refresh = 1; |
1742 | want_refresh = 1; |
1735 | |
1743 | |
1736 | HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END)); |
1744 | #if ENABLE_FRILLS |
1737 | |
1745 | if (option (Opt_urgentOnBell)) |
|
|
1746 | set_urgency (0); |
|
|
1747 | #endif |
1738 | #if ENABLE_FRILLS || ISO_14755 |
1748 | #if ENABLE_FRILLS || ISO_14755 |
1739 | if (iso14755buf) |
1749 | if (iso14755buf) |
1740 | { |
1750 | { |
1741 | iso14755buf = 0; |
1751 | iso14755buf = 0; |
1742 | # if ISO_14755 |
1752 | # if ISO_14755 |
… | |
… | |
1759 | { |
1769 | { |
1760 | pix_colors = pix_colors_unfocused; |
1770 | pix_colors = pix_colors_unfocused; |
1761 | scr_recolour (); |
1771 | scr_recolour (); |
1762 | } |
1772 | } |
1763 | #endif |
1773 | #endif |
|
|
1774 | |
|
|
1775 | HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END)); |
1764 | } |
1776 | } |
1765 | } |
1777 | } |
1766 | |
1778 | |
1767 | void |
1779 | void |
1768 | rxvt_term::update_fade_color (unsigned int idx) |
1780 | rxvt_term::update_fade_color (unsigned int idx) |