… | |
… | |
30 | |
30 | |
31 | #include <inttypes.h> |
31 | #include <inttypes.h> |
32 | |
32 | |
33 | #include "salloc.C" // HACK, should be a seperate compile! |
33 | #include "salloc.C" // HACK, should be a seperate compile! |
34 | |
34 | |
35 | inline void fill_text (text_t *start, text_t value, int len) |
35 | static inline void fill_text (text_t *start, text_t value, int len) |
36 | { |
36 | { |
37 | while (len--) |
37 | while (len--) |
38 | *start++ = value; |
38 | *start++ = value; |
39 | } |
39 | } |
40 | |
40 | |
… | |
… | |
1649 | |
1649 | |
1650 | ::swap (pix_colors[Color_fg], pix_colors[Color_bg]); |
1650 | ::swap (pix_colors[Color_fg], pix_colors[Color_bg]); |
1651 | #ifdef HAVE_BG_PIXMAP |
1651 | #ifdef HAVE_BG_PIXMAP |
1652 | if (bgPixmap.pixmap == None) |
1652 | if (bgPixmap.pixmap == None) |
1653 | #endif |
1653 | #endif |
1654 | #if ENABLE_TRANSPARENCY |
|
|
1655 | if (!option (Opt_transparent) || am_transparent == 0) |
|
|
1656 | #endif |
|
|
1657 | XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); |
1654 | XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); |
1658 | |
1655 | |
1659 | XGCValues gcvalue; |
1656 | XGCValues gcvalue; |
1660 | gcvalue.foreground = pix_colors[Color_fg]; |
1657 | gcvalue.foreground = pix_colors[Color_fg]; |
1661 | gcvalue.background = pix_colors[Color_bg]; |
1658 | gcvalue.background = pix_colors[Color_bg]; |
… | |
… | |
1804 | for (i = PART_BEG; i < RC_COUNT; i++) |
1801 | for (i = PART_BEG; i < RC_COUNT; i++) |
1805 | { |
1802 | { |
1806 | min_it (rc[i].col, ncol - 1); |
1803 | min_it (rc[i].col, ncol - 1); |
1807 | min_it (rc[i].row, nrow - 1); |
1804 | min_it (rc[i].row, nrow - 1); |
1808 | } |
1805 | } |
1809 | |
1806 | // TODO: this line somehow causes segfault if scr_expose() is called just after resize |
1810 | for (i = rc[PART_BEG].row; i <= rc[PART_END].row; i++) |
1807 | for (i = rc[PART_BEG].row; i <= rc[PART_END].row; i++) |
1811 | fill_text (&drawn_buf[i].t[rc[PART_BEG].col], 0, rc[PART_END].col - rc[PART_BEG].col + 1); |
1808 | fill_text (&drawn_buf[i].t[rc[PART_BEG].col], 0, rc[PART_END].col - rc[PART_BEG].col + 1); |
1812 | |
1809 | |
1813 | num_scr_allow = 0; |
1810 | num_scr_allow = 0; |
1814 | |
1811 | |
… | |
… | |
2004 | have_bg = 0; |
2001 | have_bg = 0; |
2005 | refresh_count = 0; |
2002 | refresh_count = 0; |
2006 | |
2003 | |
2007 | #ifdef HAVE_BG_PIXMAP |
2004 | #ifdef HAVE_BG_PIXMAP |
2008 | have_bg |= bgPixmap.pixmap != None; |
2005 | have_bg |= bgPixmap.pixmap != None; |
2009 | #endif |
|
|
2010 | #if ENABLE_TRANSPARENCY |
|
|
2011 | have_bg |= option (Opt_transparent) && am_transparent; |
|
|
2012 | #endif |
2006 | #endif |
2013 | ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ |
2007 | ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ |
2014 | |
2008 | |
2015 | /* |
2009 | /* |
2016 | * B: reverse any characters which are selected |
2010 | * B: reverse any characters which are selected |
… | |
… | |
2478 | } |
2472 | } |
2479 | |
2473 | |
2480 | void |
2474 | void |
2481 | rxvt_term::scr_recolour () NOTHROW |
2475 | rxvt_term::scr_recolour () NOTHROW |
2482 | { |
2476 | { |
2483 | if (1 |
|
|
2484 | #if ENABLE_TRANSPARENCY |
|
|
2485 | && !am_transparent |
|
|
2486 | #endif |
|
|
2487 | #ifdef HAVE_BG_PIXMAP |
2477 | #ifdef HAVE_BG_PIXMAP |
2488 | && !bgPixmap.pixmap |
2478 | bgPixmap.apply (); |
2489 | #endif |
2479 | #else |
2490 | ) |
|
|
2491 | { |
|
|
2492 | XSetWindowBackground (dpy, parent[0], pix_colors[Color_border]); |
2480 | XSetWindowBackground (dpy, parent[0], pix_colors[Color_border]); |
2493 | XClearWindow (dpy, parent[0]); |
2481 | XClearWindow (dpy, parent[0]); |
2494 | XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); |
2482 | XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); |
2495 | #if HAVE_SCROLLBARS |
2483 | # if HAVE_SCROLLBARS |
2496 | if (scrollBar.win) |
2484 | if (scrollBar.win) |
2497 | { |
2485 | { |
2498 | XSetWindowBackground (dpy, scrollBar.win, pix_colors[Color_border]); |
2486 | XSetWindowBackground (dpy, scrollBar.win, pix_colors[Color_border]); |
2499 | scrollBar.setIdle (); |
2487 | scrollBar.setIdle (); |
2500 | scrollbar_show (0); |
2488 | scrollbar_show (0); |
2501 | } |
2489 | } |
2502 | #endif |
2490 | # endif |
2503 | } |
2491 | #endif |
2504 | |
2492 | |
2505 | scr_clear (); |
2493 | scr_clear (); |
2506 | scr_touch (true); |
2494 | scr_touch (true); |
2507 | want_refresh = 1; |
2495 | want_refresh = 1; |
2508 | } |
2496 | } |
2509 | |
2497 | |