… | |
… | |
2 | * File: screen.C |
2 | * File: screen.C |
3 | *---------------------------------------------------------------------------* |
3 | *---------------------------------------------------------------------------* |
4 | * |
4 | * |
5 | * Copyright (c) 1997-2001 Geoff Wing <gcw@pobox.com> |
5 | * Copyright (c) 1997-2001 Geoff Wing <gcw@pobox.com> |
6 | * Copyright (c) 2003-2007 Marc Lehmann <schmorp@schmorp.de> |
6 | * Copyright (c) 2003-2007 Marc Lehmann <schmorp@schmorp.de> |
|
|
7 | * Copyright (c) 2015 Emanuele Giaquinta <e.giaquinta@glauco.it> |
7 | * |
8 | * |
8 | * This program is free software; you can redistribute it and/or modify |
9 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
10 | * it under the terms of the GNU General Public License as published by |
10 | * the Free Software Foundation; either version 3 of the License, or |
11 | * the Free Software Foundation; either version 3 of the License, or |
11 | * (at your option) any later version. |
12 | * (at your option) any later version. |
… | |
… | |
614 | * Change the colour for following text |
615 | * Change the colour for following text |
615 | */ |
616 | */ |
616 | void |
617 | void |
617 | rxvt_term::scr_color (unsigned int color, int fgbg) NOTHROW |
618 | rxvt_term::scr_color (unsigned int color, int fgbg) NOTHROW |
618 | { |
619 | { |
619 | if (!IN_RANGE_INC (color, minCOLOR, maxTermCOLOR)) |
620 | if (!IN_RANGE_INC (color, minCOLOR, maxTermCOLOR24)) |
620 | color = fgbg; |
621 | color = fgbg; |
621 | |
622 | |
622 | if (fgbg == Color_fg) |
623 | if (fgbg == Color_fg) |
623 | rstyle = SET_FGCOLOR (rstyle, color); |
624 | rstyle = SET_FGCOLOR (rstyle, color); |
624 | else |
625 | else |
… | |
… | |
1011 | } |
1012 | } |
1012 | else if (screen.cur.row > 0 |
1013 | else if (screen.cur.row > 0 |
1013 | && ROW(screen.cur.row - 1).is_longer ()) |
1014 | && ROW(screen.cur.row - 1).is_longer ()) |
1014 | { |
1015 | { |
1015 | linep = &ROW(screen.cur.row - 1); |
1016 | linep = &ROW(screen.cur.row - 1); |
1016 | tp = line->t + ncol - 1; |
1017 | tp = linep->t + ncol - 1; |
1017 | rp = line->r + ncol - 1; |
1018 | rp = linep->r + ncol - 1; |
1018 | } |
1019 | } |
1019 | else |
1020 | else |
1020 | continue; |
1021 | continue; |
1021 | |
1022 | |
1022 | linep->touch (); |
1023 | linep->touch (); |
… | |
… | |
1713 | |
1714 | |
1714 | if (rvideo_state != on) |
1715 | if (rvideo_state != on) |
1715 | { |
1716 | { |
1716 | rvideo_state = on; |
1717 | rvideo_state = on; |
1717 | |
1718 | |
|
|
1719 | #if OFF_FOCUS_FADING |
|
|
1720 | if (rs[Rs_fade]) |
|
|
1721 | { |
|
|
1722 | ::swap (pix_colors_focused[Color_fg], pix_colors_focused[Color_bg]); |
|
|
1723 | ::swap (pix_colors_unfocused[Color_fg], pix_colors_unfocused[Color_bg]); |
|
|
1724 | } |
|
|
1725 | else |
|
|
1726 | #endif |
1718 | ::swap (pix_colors[Color_fg], pix_colors[Color_bg]); |
1727 | ::swap (pix_colors[Color_fg], pix_colors[Color_bg]); |
1719 | #ifdef HAVE_IMG |
1728 | #ifdef HAVE_IMG |
1720 | if (bg_img == 0) |
1729 | if (bg_img == 0) |
1721 | #endif |
1730 | #endif |
1722 | XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); |
1731 | XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); |