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

Comparing rxvt-unicode/src/screen.C (file contents):
Revision 1.268 by root, Tue May 1 21:30:01 2007 UTC vs.
Revision 1.274 by sasha, Mon Aug 13 22:41:34 2007 UTC

26 26
27#include "../config.h" /* NECESSARY */ 27#include "../config.h" /* NECESSARY */
28#include "rxvt.h" /* NECESSARY */ 28#include "rxvt.h" /* NECESSARY */
29#include "rxvtperl.h" /* NECESSARY */ 29#include "rxvtperl.h" /* NECESSARY */
30 30
31#include <X11/Xmd.h> /* get the typedef for CARD32 */
32
33#include <inttypes.h> 31#include <inttypes.h>
34 32
35#include "salloc.C" // HACK, should be a seperate compile! 33#include "salloc.C" // HACK, should be a seperate compile!
36 34
37inline void fill_text (text_t *start, text_t value, int len) 35inline void fill_text (text_t *start, text_t value, int len)
161{ 159{
162#if ENABLE_OVERLAY 160#if ENABLE_OVERLAY
163 scr_overlay_off (); 161 scr_overlay_off ();
164#endif 162#endif
165 163
164 rvideo_mode = false;
166 view_start = 0; 165 view_start = 0;
167 num_scr = 0; 166 num_scr = 0;
168 167
169 if (ncol == 0) 168 if (ncol == 0)
170 ncol = 80; 169 ncol = 80;
237 selection.text = NULL; 236 selection.text = NULL;
238 selection.len = 0; 237 selection.len = 0;
239 selection.op = SELECTION_CLEAR; 238 selection.op = SELECTION_CLEAR;
240 selection.screen = PRIMARY; 239 selection.screen = PRIMARY;
241 selection.clicks = 0; 240 selection.clicks = 0;
242 rvideo_state = rvideo_mode = false;
243 } 241 }
244 else 242 else
245 { 243 {
246 /* 244 /*
247 * add or delete rows as appropriate 245 * add or delete rows as appropriate
1648 if (rvideo_state != on) 1646 if (rvideo_state != on)
1649 { 1647 {
1650 rvideo_state = on; 1648 rvideo_state = on;
1651 1649
1652 ::swap (pix_colors[Color_fg], pix_colors[Color_bg]); 1650 ::swap (pix_colors[Color_fg], pix_colors[Color_bg]);
1653#if XPM_BACKGROUND 1651#ifdef HAVE_BG_PIXMAP
1654 if (bgPixmap.pixmap == None) 1652 if (bgPixmap.pixmap == None)
1655#endif
1656#if TRANSPARENT
1657 if (!option (Opt_transparent) || am_transparent == 0)
1658#endif 1653#endif
1659 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); 1654 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]);
1660 1655
1661 XGCValues gcvalue; 1656 XGCValues gcvalue;
1662 gcvalue.foreground = pix_colors[Color_fg]; 1657 gcvalue.foreground = pix_colors[Color_fg];
1890# ifdef MAPALERT_OPTION 1885# ifdef MAPALERT_OPTION
1891 if (option (Opt_mapAlert)) 1886 if (option (Opt_mapAlert))
1892# endif 1887# endif
1893 XMapWindow (dpy, parent[0]); 1888 XMapWindow (dpy, parent[0]);
1894# endif 1889# endif
1890# if ENABLE_FRILLS
1891 if (option (Opt_urgentOnBell))
1892 {
1893 XWMHints *h;
1894
1895 h = XGetWMHints(dpy, parent[0]);
1896 if (h != NULL)
1897 {
1898 h->flags |= XUrgencyHint;
1899 XSetWMHints(dpy, parent[0], h);
1900 }
1901 }
1902# endif
1895 1903
1896 if (option (Opt_visualBell)) 1904 if (option (Opt_visualBell))
1897 { 1905 {
1898 rvideo_bell = true; 1906 rvideo_bell = true;
1899 scr_rvideo_mode (rvideo_mode); 1907 scr_rvideo_mode (rvideo_mode);
1901 1909
1902 bell_ev.start (NOW + VISUAL_BELL_DURATION); 1910 bell_ev.start (NOW + VISUAL_BELL_DURATION);
1903 } 1911 }
1904 else 1912 else
1905 XBell (dpy, 0); 1913 XBell (dpy, 0);
1906
1907#endif 1914#endif
1908} 1915}
1909 1916
1910/* ------------------------------------------------------------------------- */ 1917/* ------------------------------------------------------------------------- */
1911/* ARGSUSED */ 1918/* ARGSUSED */
1992 * A: set up vars 1999 * A: set up vars
1993 */ 2000 */
1994 have_bg = 0; 2001 have_bg = 0;
1995 refresh_count = 0; 2002 refresh_count = 0;
1996 2003
1997#if XPM_BACKGROUND 2004#ifdef HAVE_BG_PIXMAP
1998 have_bg |= bgPixmap.pixmap != None; 2005 have_bg |= bgPixmap.pixmap != None;
1999#endif
2000#if TRANSPARENT
2001 have_bg |= option (Opt_transparent) && am_transparent;
2002#endif 2006#endif
2003 ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ 2007 ocrow = oldcursor.row; /* is there an old outline cursor on screen? */
2004 2008
2005 /* 2009 /*
2006 * B: reverse any characters which are selected 2010 * B: reverse any characters which are selected
2468} 2472}
2469 2473
2470void 2474void
2471rxvt_term::scr_recolour () NOTHROW 2475rxvt_term::scr_recolour () NOTHROW
2472{ 2476{
2473 if (1 2477#ifdef HAVE_BG_PIXMAP
2474#if TRANSPARENT 2478 bgPixmap.apply ();
2475 && !am_transparent 2479#else
2476#endif
2477#if XPM_BACKGROUND
2478 && !bgPixmap.pixmap
2479#endif
2480 )
2481 {
2482 XSetWindowBackground (dpy, parent[0], pix_colors[Color_border]); 2480 XSetWindowBackground (dpy, parent[0], pix_colors[Color_border]);
2483 XClearWindow (dpy, parent[0]); 2481 XClearWindow (dpy, parent[0]);
2484 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); 2482 XSetWindowBackground (dpy, vt, pix_colors[Color_bg]);
2485#if HAVE_SCROLLBARS 2483# if HAVE_SCROLLBARS
2486 if (scrollBar.win) 2484 if (scrollBar.win)
2487 { 2485 {
2488 XSetWindowBackground (dpy, scrollBar.win, pix_colors[Color_border]); 2486 XSetWindowBackground (dpy, scrollBar.win, pix_colors[Color_border]);
2489 scrollBar.setIdle (); 2487 scrollBar.setIdle ();
2490 scrollbar_show (0); 2488 scrollbar_show (0);
2491 } 2489 }
2492#endif 2490# endif
2493 } 2491#endif
2494 2492
2495 scr_clear (); 2493 scr_clear ();
2496 scr_touch (true); 2494 scr_touch (true);
2497 want_refresh = 1; 2495 want_refresh = 1;
2498} 2496}
2499 2497

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines