… | |
… | |
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 |
… | |
… | |
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]); |
… | |
… | |
3491 | cl = selection.clip_text; |
3500 | cl = selection.clip_text; |
3492 | selectlen = selection.clip_len; |
3501 | selectlen = selection.clip_len; |
3493 | } |
3502 | } |
3494 | else |
3503 | else |
3495 | { |
3504 | { |
3496 | cl = L""; |
3505 | cl = (wchar_t *)L""; |
3497 | selectlen = 0; |
3506 | selectlen = 0; |
3498 | } |
3507 | } |
3499 | |
3508 | |
3500 | #if !ENABLE_MINIMAL |
3509 | #if !ENABLE_MINIMAL |
3501 | // xlib is horribly broken with respect to UTF8_STRING, and nobody cares to fix it |
3510 | // xlib is horribly broken with respect to UTF8_STRING, and nobody cares to fix it |