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.525 by sf-exg, Wed Aug 15 19:41:49 2012 UTC vs.
Revision 1.533 by sf-exg, Fri Feb 1 11:26:40 2013 UTC

4 * 4 *
5 * All portions of code are copyright by their respective author/s. 5 * All portions of code are copyright by their respective author/s.
6 * Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk> 6 * Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk>
7 * - original version 7 * - original version
8 * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> 8 * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com>
9 * - extensive modifications 9 * - extensive modifications
10 * Copyright (c) 1995 Garrett D'Amore <garrett@netcom.com> 10 * Copyright (c) 1995 Garrett D'Amore <garrett@netcom.com>
11 * - vt100 printing 11 * - vt100 printing
12 * Copyright (c) 1995 Steven Hirsch <hirsch@emba.uvm.edu> 12 * Copyright (c) 1995 Steven Hirsch <hirsch@emba.uvm.edu>
13 * - X11 mouse report mode and support for 13 * - X11 mouse report mode and support for
14 * DEC "private mode" save/restore functions. 14 * DEC "private mode" save/restore functions.
20 * Copyright (c) 1997 Raul Garcia Garcia <rgg@tid.es> 20 * Copyright (c) 1997 Raul Garcia Garcia <rgg@tid.es>
21 * - modification and cleanups for Solaris 2.x 21 * - modification and cleanups for Solaris 2.x
22 * and Linux 1.2.x 22 * and Linux 1.2.x
23 * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> 23 * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de>
24 * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> 24 * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com>
25 * - extensive modifications 25 * - extensive modifications
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-2011 Marc Lehmann <schmorp@schmorp.de> 30 * Copyright (c) 2003-2011 Marc Lehmann <schmorp@schmorp.de>
941void 941void
942rxvt_term::flush () 942rxvt_term::flush ()
943{ 943{
944 flush_ev.stop (); 944 flush_ev.stop ();
945 945
946#ifdef HAVE_BG_PIXMAP 946#ifdef HAVE_IMG
947 if (bg_flags & BG_NEEDS_REFRESH) 947 if (bg_flags & BG_NEEDS_REFRESH)
948 { 948 {
949 bg_flags &= ~BG_NEEDS_REFRESH; 949 bg_flags &= ~BG_NEEDS_REFRESH;
950 scr_touch (false); 950 scr_touch (false);
951 } 951 }
1472 bool moved = false; 1472 bool moved = false;
1473#ifdef HAVE_BG_PIXMAP 1473#ifdef HAVE_BG_PIXMAP
1474 if (bg_window_position_sensitive ()) 1474 if (bg_window_position_sensitive ())
1475 { 1475 {
1476 want_position_change = true; 1476 want_position_change = true;
1477 if (!(bg_flags & BG_IS_VALID)) 1477 if (bg_img == 0)
1478 moved = true; 1478 moved = true;
1479 } 1479 }
1480#endif 1480#endif
1481 1481
1482 if (want_position_change) 1482 if (want_position_change)
1529 selection_send (ev.xselectionrequest); 1529 selection_send (ev.xselectionrequest);
1530 break; 1530 break;
1531 1531
1532 case MapNotify: 1532 case MapNotify:
1533#ifdef HAVE_BG_PIXMAP 1533#ifdef HAVE_BG_PIXMAP
1534 /* This is needed specifically to fix the case of no window manager or a 1534 // This is needed at startup for the case of no window manager
1535 * non-reparenting window manager. In those cases we never get first 1535 // or a non-reparenting window manager and also because we
1536 * ConfigureNotify. Also that speeds startup under normal WM, by taking 1536 // defer bg image updates if the window is not mapped. The
1537 * care of multiplicity of ConfigureNotify events arriving while WM does 1537 // short delay is to optimize for multiple ConfigureNotify
1538 * reparenting. 1538 // events at startup when the window manager reparents the
1539 * We should not render background immediately, as there could be several 1539 // window, so as to perform the computation after we have
1540 * ConfigureNotify's to follow. Lets take care of all of them in one scoop 1540 // received all of them.
1541 * by scheduling background redraw as soon as we can, but giving a short 1541 if (bg_img == 0)
1542 * bit of time for ConfigureNotifies to arrive.
1543 * We should render background PRIOR to drawing any text, but AFTER all
1544 * of ConfigureNotifys for the best results.
1545 */
1546 if (!(bg_flags & BG_IS_VALID))
1547 update_background_ev.start (0.025); 1542 update_background_ev.start (0.025);
1548#endif 1543#endif
1549 mapped = 1; 1544 mapped = 1;
1550#ifdef TEXT_BLINK 1545#ifdef TEXT_BLINK
1551 text_blink_ev.start (); 1546 text_blink_ev.start ();
1838 pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); 1833 pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c);
1839 } 1834 }
1840#endif 1835#endif
1841} 1836}
1842 1837
1843#if ENABLE_TRANSPARENCY || ENABLE_PERL 1838#if BG_IMAGE_FROM_ROOT || ENABLE_PERL
1844void ecb_hot 1839void ecb_hot
1845rxvt_term::rootwin_cb (XEvent &ev) 1840rxvt_term::rootwin_cb (XEvent &ev)
1846{ 1841{
1847 make_current (); 1842 make_current ();
1848 1843
1858 * use the property to determine the pixmap. We use it later on. 1853 * use the property to determine the pixmap. We use it later on.
1859 */ 1854 */
1860 if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID] 1855 if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID]
1861 || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID]) 1856 || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID])
1862 { 1857 {
1863# if ENABLE_TRANSPARENCY 1858#if BG_IMAGE_FROM_ROOT
1864 bg_set_root_pixmap (); 1859 if (option (Opt_transparent))
1860 {
1861 rxvt_img::new_from_root (this)->replace (root_img);
1865 update_background (); 1862 update_background ();
1863 }
1866#endif 1864#endif
1867#if ENABLE_PERL
1868 HOOK_INVOKE ((this, HOOK_ROOTPMAP_CHANGE, DT_END)); 1865 HOOK_INVOKE ((this, HOOK_ROOTPMAP_CHANGE, DT_END));
1869#endif
1870 } 1866 }
1871 1867
1872 break; 1868 break;
1873 } 1869 }
1874 1870
3453 break; 3449 break;
3454#endif 3450#endif
3455 case URxvt_Color_border: 3451 case URxvt_Color_border:
3456 process_color_seq (op, Color_border, str, resp); 3452 process_color_seq (op, Color_border, str, resp);
3457 break; 3453 break;
3458#if ENABLE_TRANSPARENCY 3454
3455#if BG_IMAGE_FROM_ROOT
3459 case URxvt_Color_tint: 3456 case URxvt_Color_tint:
3460 process_color_seq (op, Color_tint, str, resp); 3457 process_color_seq (op, Color_tint, str, resp);
3461 { 3458 {
3462 bool changed = false; 3459 bool changed = false;
3463 3460

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines