ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.562 by root, Fri Nov 28 22:09:06 2014 UTC vs.
Revision 1.568 by sf-exg, Tue Oct 13 08:10:43 2015 UTC

26 * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> 26 * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org>
27 * Copyright (c) 2001 Marius Gedminas 27 * Copyright (c) 2001 Marius Gedminas
28 * - Ctrl/Mod4+Tab works like Meta+Tab (options) 28 * - Ctrl/Mod4+Tab works like Meta+Tab (options)
29 * Copyright (c) 2003 Rob McMullen <robm@flipturn.org> 29 * Copyright (c) 2003 Rob McMullen <robm@flipturn.org>
30 * Copyright (c) 2003-2014 Marc Lehmann <schmorp@schmorp.de> 30 * Copyright (c) 2003-2014 Marc Lehmann <schmorp@schmorp.de>
31 * Copyright (c) 2007 Emanuele Giaquinta <e.giaquinta@glauco.it> 31 * Copyright (c) 2007,2015 Emanuele Giaquinta <e.giaquinta@glauco.it>
32 * 32 *
33 * This program is free software; you can redistribute it and/or modify 33 * This program is free software; you can redistribute it and/or modify
34 * it under the terms of the GNU General Public License as published by 34 * it under the terms of the GNU General Public License as published by
35 * the Free Software Foundation; either version 3 of the License, or 35 * the Free Software Foundation; either version 3 of the License, or
36 * (at your option) any later version. 36 * (at your option) any later version.
1034 1034
1035#ifdef CURSOR_BLINK 1035#ifdef CURSOR_BLINK
1036void 1036void
1037rxvt_term::cursor_blink_reset () 1037rxvt_term::cursor_blink_reset ()
1038{ 1038{
1039 if (!focus)
1040 return;
1041
1039 if (hidden_cursor) 1042 if (hidden_cursor)
1040 { 1043 {
1041 hidden_cursor = 0; 1044 hidden_cursor = 0;
1042 want_refresh = 1; 1045 want_refresh = 1;
1043 } 1046 }
1239 1242
1240void ecb_cold 1243void ecb_cold
1241rxvt_term::pointer_unblank () 1244rxvt_term::pointer_unblank ()
1242{ 1245{
1243 XDefineCursor (dpy, vt, TermWin_cursor); 1246 XDefineCursor (dpy, vt, TermWin_cursor);
1244 recolour_cursor (); 1247 recolor_cursor ();
1245 1248
1246#ifdef POINTER_BLANK 1249#ifdef POINTER_BLANK
1247 hidden_pointer = 0; 1250 hidden_pointer = 0;
1248 1251
1249 if (option (Opt_pointerBlank)) 1252 if (option (Opt_pointerBlank))
1609 case MotionNotify: 1612 case MotionNotify:
1610#ifdef POINTER_BLANK 1613#ifdef POINTER_BLANK
1611 if (hidden_pointer) 1614 if (hidden_pointer)
1612 pointer_unblank (); 1615 pointer_unblank ();
1613#endif 1616#endif
1617 if (!bypass_keystate
1614 if ((priv_modes & PrivMode_MouseBtnEvent && ev.xbutton.state & (Button1Mask|Button2Mask|Button3Mask)) 1618 && ((priv_modes & PrivMode_MouseBtnEvent && ev.xbutton.state & (Button1Mask|Button2Mask|Button3Mask))
1615 || priv_modes & PrivMode_MouseAnyEvent) 1619 || priv_modes & PrivMode_MouseAnyEvent))
1616 mouse_report (ev.xbutton); 1620 mouse_report (ev.xbutton);
1617 if ((priv_modes & PrivMode_mouse_report) && !bypass_keystate) 1621 if ((priv_modes & PrivMode_mouse_report) && !bypass_keystate)
1618 break; 1622 break;
1619 1623
1620 if (ev.xany.window == vt) 1624 if (ev.xany.window == vt)
1632 &unused_root_x, &unused_root_y, 1636 &unused_root_x, &unused_root_y,
1633 &ev.xbutton.x, &ev.xbutton.y, 1637 &ev.xbutton.x, &ev.xbutton.y,
1634 &ev.xbutton.state); 1638 &ev.xbutton.state);
1635#ifdef MOUSE_THRESHOLD 1639#ifdef MOUSE_THRESHOLD
1636 /* deal with a `jumpy' mouse */ 1640 /* deal with a `jumpy' mouse */
1637 if ((ev.xmotion.time - MEvent.time) > MOUSE_THRESHOLD) 1641 if (ev.xmotion.time - MEvent.time > MOUSE_THRESHOLD)
1642#endif
1638 { 1643 {
1639#endif
1640#if ISO_14755 1644#if ISO_14755
1641 // 5.4 1645 // 5.4
1642 if (iso14755buf & (ISO_14755_STARTED | ISO_14755_54)) 1646 if (iso14755buf & (ISO_14755_STARTED | ISO_14755_54))
1643 { 1647 {
1644 iso14755_54 (ev.xbutton.x, ev.xbutton.y); 1648 iso14755_54 (ev.xbutton.x, ev.xbutton.y);
1693 * shouldn't be scrolling 1697 * shouldn't be scrolling
1694 */ 1698 */
1695 sel_scroll_ev.stop(); 1699 sel_scroll_ev.stop();
1696 } 1700 }
1697#endif 1701#endif
1698#ifdef MOUSE_THRESHOLD
1699 } 1702 }
1700#endif
1701 } 1703 }
1702 } 1704 }
1703 else if (scrollBar.state == SB_STATE_MOTION && ev.xany.window == scrollBar.win) 1705 else if (scrollBar.state == SB_STATE_MOTION && ev.xany.window == scrollBar.win)
1704 { 1706 {
1705 while (XCheckTypedWindowEvent (dpy, scrollBar.win, 1707 while (XCheckTypedWindowEvent (dpy, scrollBar.win,
1779#endif 1781#endif
1780#if OFF_FOCUS_FADING 1782#if OFF_FOCUS_FADING
1781 if (rs[Rs_fade]) 1783 if (rs[Rs_fade])
1782 { 1784 {
1783 pix_colors = pix_colors_focused; 1785 pix_colors = pix_colors_focused;
1784 scr_recolour (); 1786 scr_recolor ();
1785 } 1787 }
1786#endif 1788#endif
1787#if ENABLE_FRILLS 1789#if ENABLE_FRILLS
1788 if (option (Opt_urgentOnBell)) 1790 if (option (Opt_urgentOnBell))
1789 set_urgency (0); 1791 set_urgency (0);
1826#endif 1828#endif
1827#if OFF_FOCUS_FADING 1829#if OFF_FOCUS_FADING
1828 if (rs[Rs_fade]) 1830 if (rs[Rs_fade])
1829 { 1831 {
1830 pix_colors = pix_colors_unfocused; 1832 pix_colors = pix_colors_unfocused;
1831 scr_recolour (); 1833 scr_recolor ();
1832 } 1834 }
1833#endif 1835#endif
1834 1836
1835 HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END)); 1837 HOOK_INVOKE ((this, HOOK_FOCUS_OUT, DT_END));
1836 } 1838 }
1837} 1839}
1838 1840
1839void ecb_cold 1841void ecb_cold
1840rxvt_term::update_fade_color (unsigned int idx) 1842rxvt_term::update_fade_color (unsigned int idx, bool first_time)
1841{ 1843{
1842#if OFF_FOCUS_FADING 1844#if OFF_FOCUS_FADING
1843 if (rs[Rs_fade]) 1845 if (rs[Rs_fade])
1844 { 1846 {
1847 if (!first_time)
1848 pix_colors_focused [idx].free (this);
1849
1845 rgba c; 1850 rgba c;
1846 pix_colors [Color_fade].get (c); 1851 pix_colors [Color_fade].get (c);
1847 pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); 1852 pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c);
1848 } 1853 }
1849#endif 1854#endif
3333 rgba c; 3338 rgba c;
3334 pix_colors_focused[color].get (c); 3339 pix_colors_focused[color].get (c);
3335 3340
3336#if XFT 3341#if XFT
3337 if (c.a != rgba::MAX_CC) 3342 if (c.a != rgba::MAX_CC)
3338 tt_printf ("\033]%d;rgba:%04x/%04x/%04x/%04x%c", report, c.a, c.r, c.g, c.b, resp); 3343 tt_printf ("\033]%d;rgba:%04x/%04x/%04x/%04x%c", report, c.r, c.g, c.b, c.a, resp);
3339 else 3344 else
3340#endif 3345#endif
3341 tt_printf ("\033]%d;rgb:%04x/%04x/%04x%c", report, c.r, c.g, c.b, resp); 3346 tt_printf ("\033]%d;rgb:%04x/%04x/%04x%c", report, c.r, c.g, c.b, resp);
3342 } 3347 }
3343 else 3348 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines