1 | /*--------------------------------*-C-*---------------------------------* |
1 | /*--------------------------------*-C-*---------------------------------* |
2 | * File: init.c |
2 | * File: init.C |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
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 |
… | |
… | |
313 | #endif |
313 | #endif |
314 | #ifndef NO_CURSORCOLOR |
314 | #ifndef NO_CURSORCOLOR |
315 | COLOR_CURSOR_BACKGROUND, |
315 | COLOR_CURSOR_BACKGROUND, |
316 | COLOR_CURSOR_FOREGROUND, |
316 | COLOR_CURSOR_FOREGROUND, |
317 | #endif /* ! NO_CURSORCOLOR */ |
317 | #endif /* ! NO_CURSORCOLOR */ |
318 | NULL, /* Color_pointer */ |
318 | NULL, /* Color_pointer_fg */ |
|
|
319 | NULL, /* Color_pointer_bg */ |
319 | NULL, /* Color_border */ |
320 | NULL, /* Color_border */ |
320 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
321 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
321 | NULL, /* Color_BD */ |
322 | NULL, /* Color_BD */ |
322 | NULL, /* Color_UL */ |
323 | NULL, /* Color_UL */ |
323 | NULL, /* Color_RV */ |
324 | NULL, /* Color_RV */ |
… | |
… | |
327 | #endif |
328 | #endif |
328 | #ifdef KEEP_SCROLLCOLOR |
329 | #ifdef KEEP_SCROLLCOLOR |
329 | COLOR_SCROLLBAR, |
330 | COLOR_SCROLLBAR, |
330 | COLOR_SCROLLTROUGH, |
331 | COLOR_SCROLLTROUGH, |
331 | #endif /* KEEP_SCROLLCOLOR */ |
332 | #endif /* KEEP_SCROLLCOLOR */ |
332 | |
333 | #if TINTING |
|
|
334 | NULL, |
|
|
335 | #endif |
333 | }; |
336 | }; |
334 | |
337 | |
335 | const char *const xa_names[NUM_XA] = |
338 | const char *const xa_names[NUM_XA] = |
336 | { |
339 | { |
337 | "TEXT", |
340 | "TEXT", |
… | |
… | |
354 | }; |
357 | }; |
355 | |
358 | |
356 | bool |
359 | bool |
357 | rxvt_term::init_vars () |
360 | rxvt_term::init_vars () |
358 | { |
361 | { |
359 | PixColors = new rxvt_color [TOTAL_COLORS]; |
362 | PixColorsFocused = new rxvt_color [TOTAL_COLORS]; |
|
|
363 | #ifdef OFF_FOCUS_FADING |
|
|
364 | PixColorsUnFocused = new rxvt_color [TOTAL_COLORS]; |
|
|
365 | #endif |
|
|
366 | PixColors = PixColorsFocused; |
|
|
367 | |
360 | if (PixColors == NULL) |
368 | if (PixColors == NULL) |
361 | return false; |
369 | return false; |
362 | |
370 | |
363 | #if defined(XPM_BACKGROUND) || defined(TRANSPARENT) |
371 | #if defined(XPM_BACKGROUND) || defined(TRANSPARENT) |
364 | TermWin.pixmap = None; |
372 | TermWin.pixmap = None; |
… | |
… | |
644 | color_aliases (Color_bg); |
652 | color_aliases (Color_bg); |
645 | #ifndef NO_CURSORCOLOR |
653 | #ifndef NO_CURSORCOLOR |
646 | color_aliases (Color_cursor); |
654 | color_aliases (Color_cursor); |
647 | color_aliases (Color_cursor2); |
655 | color_aliases (Color_cursor2); |
648 | #endif /* NO_CURSORCOLOR */ |
656 | #endif /* NO_CURSORCOLOR */ |
649 | color_aliases (Color_pointer); |
657 | color_aliases (Color_pointer_fg); |
|
|
658 | color_aliases (Color_pointer_bg); |
650 | color_aliases (Color_border); |
659 | color_aliases (Color_border); |
651 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
660 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
652 | color_aliases (Color_BD); |
661 | color_aliases (Color_BD); |
653 | color_aliases (Color_UL); |
662 | color_aliases (Color_UL); |
654 | color_aliases (Color_RV); |
663 | color_aliases (Color_RV); |
… | |
… | |
748 | void |
757 | void |
749 | rxvt_term::set_locale (const char *locale) |
758 | rxvt_term::set_locale (const char *locale) |
750 | { |
759 | { |
751 | #if HAVE_XSETLOCALE || HAVE_SETLOCALE |
760 | #if HAVE_XSETLOCALE || HAVE_SETLOCALE |
752 | free (this->locale); |
761 | free (this->locale); |
753 | this->locale = rxvt_strdup (setlocale (LC_CTYPE, locale)); |
762 | this->locale = setlocale (LC_CTYPE, locale); |
|
|
763 | |
|
|
764 | if (!this->locale) |
|
|
765 | { |
|
|
766 | rxvt_warn ("unable to set locale \"%s\", using default locale instead.\n", locale); |
|
|
767 | setlocale (LC_CTYPE, ""); |
|
|
768 | this->locale = ""; |
|
|
769 | } |
|
|
770 | |
|
|
771 | this->locale = rxvt_strdup (this->locale); |
754 | SET_LOCALE (this->locale); |
772 | SET_LOCALE (this->locale); |
755 | mbstate.reset (); |
773 | mbstate.reset (); |
756 | #endif |
774 | #endif |
757 | #if 0 |
775 | #if 0 |
758 | #if HAVE_NL_LANGINFO |
776 | #if HAVE_NL_LANGINFO |
… | |
… | |
821 | meta_char = (Options & Opt_meta8 ? 0x80 : C0_ESC); |
839 | meta_char = (Options & Opt_meta8 ? 0x80 : C0_ESC); |
822 | #endif |
840 | #endif |
823 | |
841 | |
824 | get_ourmods (); |
842 | get_ourmods (); |
825 | |
843 | |
826 | if (! (Options & Opt_scrollTtyOutput)) |
844 | if (!(Options & Opt_scrollTtyOutput)) |
827 | PrivateModes |= PrivMode_TtyOutputInh; |
845 | PrivateModes |= PrivMode_TtyOutputInh; |
828 | if (Options & Opt_scrollTtyKeypress) |
846 | if (Options & Opt_scrollTtyKeypress) |
829 | PrivateModes |= PrivMode_Keypress; |
847 | PrivateModes |= PrivMode_Keypress; |
830 | if (! (Options & Opt_jumpScroll)) |
848 | if (!(Options & Opt_jumpScroll)) |
831 | PrivateModes |= PrivMode_smoothScroll; |
849 | PrivateModes |= PrivMode_smoothScroll; |
832 | |
850 | |
833 | #ifndef NO_BACKSPACE_KEY |
851 | #ifndef NO_BACKSPACE_KEY |
834 | if (STRCMP (key_backspace, "DEC") == 0) |
852 | if (STRCMP (key_backspace, "DEC") == 0) |
835 | PrivateModes |= PrivMode_HaveBackSpace; |
853 | PrivateModes |= PrivMode_HaveBackSpace; |
… | |
… | |
860 | void |
878 | void |
861 | rxvt_term::Get_Colours () |
879 | rxvt_term::Get_Colours () |
862 | { |
880 | { |
863 | int i; |
881 | int i; |
864 | |
882 | |
|
|
883 | #ifdef OFF_FOCUS_FADING |
|
|
884 | PixColors = PixColorsFocused; |
|
|
885 | #endif |
|
|
886 | |
865 | for (i = 0; i < (XDEPTH <= 2 ? 2 : NRS_COLORS); i++) |
887 | for (i = 0; i < (XDEPTH <= 2 ? 2 : NRS_COLORS); i++) |
866 | { |
888 | { |
867 | rxvt_color xcol; |
889 | rxvt_color xcol; |
868 | |
890 | |
869 | if (!rs[Rs_color + i]) |
891 | if (!rs[Rs_color + i]) |
… | |
… | |
894 | #ifndef NO_CURSORCOLOR |
916 | #ifndef NO_CURSORCOLOR |
895 | case Color_cursor2: |
917 | case Color_cursor2: |
896 | xcol = PixColors[Color_fg]; |
918 | xcol = PixColors[Color_fg]; |
897 | break; |
919 | break; |
898 | #endif /* ! NO_CURSORCOLOR */ |
920 | #endif /* ! NO_CURSORCOLOR */ |
899 | case Color_pointer: |
921 | case Color_pointer_fg: |
900 | xcol = PixColors[Color_fg]; |
922 | xcol = PixColors[Color_fg]; |
901 | break; |
923 | break; |
902 | default: |
924 | default: |
903 | xcol = PixColors[Color_bg]; /* None */ |
925 | xcol = PixColors[Color_bg]; /* None */ |
904 | break; |
926 | break; |
905 | } |
927 | } |
906 | } |
928 | } |
907 | } |
929 | } |
908 | |
930 | |
909 | PixColors[i] = xcol; |
931 | PixColors[i] = xcol; |
|
|
932 | #ifdef OFF_FOCUS_FADING |
|
|
933 | if (rs[Rs_fade]) |
|
|
934 | PixColorsUnFocused[i] = xcol.fade (display, atoi (rs[Rs_fade])); |
|
|
935 | #endif |
910 | SET_PIXCOLOR (i); |
936 | SET_PIXCOLOR (i); |
911 | } |
937 | } |
912 | |
938 | |
913 | if (XDEPTH <= 2 || !rs[Rs_color + Color_pointer]) |
939 | if (XDEPTH <= 2) |
914 | PixColors[Color_pointer] = PixColors[Color_fg]; |
940 | { |
915 | if (XDEPTH <= 2 || !rs[Rs_color + Color_border]) |
941 | if (!rs[Rs_color + Color_pointer_fg]) PixColors[Color_pointer_fg] = PixColors[Color_fg]; |
916 | PixColors[Color_border] = PixColors[Color_fg]; |
942 | if (!rs[Rs_color + Color_pointer_bg]) PixColors[Color_pointer_bg] = PixColors[Color_bg]; |
|
|
943 | if (!rs[Rs_color + Color_border] ) PixColors[Color_border] = PixColors[Color_fg]; |
|
|
944 | } |
917 | |
945 | |
918 | /* |
946 | /* |
919 | * get scrollBar/menuBar shadow colors |
947 | * get scrollBar/menuBar shadow colors |
920 | * |
948 | * |
921 | * The calculations of topShadow/bottomShadow values are adapted |
949 | * The calculations of topShadow/bottomShadow values are adapted |
… | |
… | |
923 | */ |
951 | */ |
924 | #ifdef KEEP_SCROLLCOLOR |
952 | #ifdef KEEP_SCROLLCOLOR |
925 | |
953 | |
926 | if (XDEPTH <= 2) |
954 | if (XDEPTH <= 2) |
927 | { /* Monochrome */ |
955 | { /* Monochrome */ |
928 | PixColors[Color_scroll] = PixColors[Color_fg]; |
956 | PixColors[Color_scroll] = PixColors[Color_fg]; |
929 | PixColors[Color_topShadow] = PixColors[Color_bg]; |
957 | PixColors[Color_topShadow] = PixColors[Color_bg]; |
930 | PixColors[Color_bottomShadow] = PixColors[Color_bg]; |
958 | PixColors[Color_bottomShadow] = PixColors[Color_bg]; |
931 | } |
959 | } |
932 | else |
960 | else |
933 | { |
961 | { |
934 | rxvt_color xcol[3]; |
962 | rxvt_color xcol[2]; |
935 | /* xcol[0] == white |
963 | /* xcol[0] == white |
936 | * xcol[1] == top shadow |
964 | * xcol[1] == top shadow |
937 | * xcol[2] == bot shadow */ |
965 | * xcol[2] == bot shadow */ |
938 | |
966 | |
939 | xcol[1] = PixColors[Color_scroll]; |
967 | xcol[1] = PixColors[Color_scroll]; |
940 | # ifdef PREFER_24BIT |
|
|
941 | xcol[0].set (display, 65535, 65535, 65535); |
968 | xcol[0].set (display, 65535, 65535, 65535); |
942 | /* XFreeColors (display->display, XCMAP, & (xcol[0].pixel), 1, ~0); */ |
|
|
943 | # else |
|
|
944 | xcol[0].set (display, WhitePixel (display->display, display->screen)); |
|
|
945 | # endif |
|
|
946 | |
969 | |
947 | unsigned short pr1, pg1, pb1, pr0, pg0, pb0; |
970 | unsigned short pr1, pg1, pb1, pr0, pg0, pb0; |
948 | |
971 | |
949 | xcol[0].get (display, pr0, pg0, pb0); |
972 | xcol[0].get (display, pr0, pg0, pb0); |
950 | xcol[1].get (display, pr1, pg1, pb1); |
973 | xcol[1].get (display, pr1, pg1, pb1); |
951 | |
974 | |
952 | /* bottomShadowColor */ |
|
|
953 | if (!xcol[2].set (display, pr1 / 2, pg1 / 2, pb1 / 2)) |
|
|
954 | xcol[2] = PixColors[Color_Black]; |
|
|
955 | |
|
|
956 | PixColors[Color_bottomShadow] = xcol[2]; |
975 | PixColors[Color_bottomShadow] = xcol[1].fade (display, 50); |
957 | |
976 | |
958 | /* topShadowColor */ |
977 | /* topShadowColor */ |
959 | if (!xcol[1].set (display, |
978 | if (!xcol[1].set (display, |
960 | min (pr0, max (pr0 / 5, pr1) * 7 / 5), |
979 | min (pr0, max (pr0 / 5, pr1) * 7 / 5), |
961 | min (pg0, max (pg0 / 5, pg1) * 7 / 5), |
980 | min (pg0, max (pg0 / 5, pg1) * 7 / 5), |
… | |
… | |
1065 | /*----------------------------------------------------------------------*/ |
1084 | /*----------------------------------------------------------------------*/ |
1066 | /* rxvt_Create_Windows () - Open and map the window */ |
1085 | /* rxvt_Create_Windows () - Open and map the window */ |
1067 | void |
1086 | void |
1068 | rxvt_term::create_windows (int argc, const char *const *argv) |
1087 | rxvt_term::create_windows (int argc, const char *const *argv) |
1069 | { |
1088 | { |
1070 | XClassHint classHint; |
1089 | XClassHint classHint; |
1071 | XWMHints wmHint; |
1090 | XWMHints wmHint; |
1072 | XGCValues gcvalue; |
1091 | XGCValues gcvalue; |
1073 | long vt_emask; |
1092 | long vt_emask; |
1074 | |
1093 | XSetWindowAttributes attributes; |
1075 | XWindowAttributes gattr; |
1094 | XWindowAttributes gattr; |
1076 | |
1095 | |
1077 | if (Options & Opt_transparent) |
1096 | if (Options & Opt_transparent) |
1078 | { |
1097 | { |
1079 | XGetWindowAttributes (display->display, RootWindow (display->display, display->screen), &gattr); |
1098 | XGetWindowAttributes (display->display, RootWindow (display->display, display->screen), &gattr); |
… | |
… | |
1092 | |
1111 | |
1093 | window_calc (0, 0); |
1112 | window_calc (0, 0); |
1094 | old_width = szHint.width; |
1113 | old_width = szHint.width; |
1095 | old_height = szHint.height; |
1114 | old_height = szHint.height; |
1096 | |
1115 | |
1097 | /* parent window - reverse video so we can see placement errors |
|
|
1098 | * sub-window placement & size in rxvt_resize_subwindows () |
1116 | /* sub-window placement & size in rxvt_resize_subwindows () */ |
1099 | */ |
|
|
1100 | |
1117 | |
1101 | #ifdef PREFER_24BIT |
1118 | #ifdef PREFER_24BIT |
1102 | XSetWindowAttributes attributes; |
|
|
1103 | |
|
|
1104 | attributes.background_pixel = PixColors[Color_fg]; |
1119 | attributes.background_pixel = PixColors[Color_bg]; |
1105 | attributes.border_pixel = PixColors[Color_border]; |
1120 | attributes.border_pixel = PixColors[Color_border]; |
1106 | attributes.colormap = display->cmap; |
1121 | attributes.colormap = display->cmap; |
1107 | TermWin.parent[0] = XCreateWindow (display->display, DefaultRootWindow (display->display), |
1122 | TermWin.parent[0] = XCreateWindow (display->display, DefaultRootWindow (display->display), |
1108 | szHint.x, szHint.y, |
1123 | szHint.x, szHint.y, |
1109 | szHint.width, szHint.height, |
1124 | szHint.width, szHint.height, |
1110 | TermWin.ext_bwidth, |
1125 | TermWin.ext_bwidth, |
1111 | display->depth, InputOutput, |
1126 | display->depth, InputOutput, |
1112 | display->visual, |
1127 | display->visual, |
1113 | CWBackPixel | CWBorderPixel | CWColormap, &attributes); |
1128 | CWColormap | CWBackPixel | CWBorderPixel, &attributes); |
1114 | #else |
1129 | #else |
1115 | TermWin.parent[0] = XCreateSimpleWindow (display->display, DefaultRootWindow (display->display), |
1130 | TermWin.parent[0] = XCreateSimpleWindow (display->display, DefaultRootWindow (display->display), |
1116 | szHint.x, szHint.y, |
1131 | szHint.x, szHint.y, |
1117 | szHint.width, |
1132 | szHint.width, szHint.height, |
1118 | szHint.height, |
|
|
1119 | TermWin.ext_bwidth, |
1133 | TermWin.ext_bwidth, |
1120 | PixColors[Color_border], |
1134 | PixColors[Color_border], |
1121 | PixColors[Color_fg]); |
1135 | PixColors[Color_bg]); |
1122 | #endif |
1136 | #endif |
1123 | |
1137 | |
1124 | xterm_seq (XTerm_title, rs[Rs_title], CHAR_ST); |
1138 | process_xterm_seq (XTerm_title, rs[Rs_title], CHAR_ST); |
1125 | xterm_seq (XTerm_iconName, rs[Rs_iconName], CHAR_ST); |
1139 | process_xterm_seq (XTerm_iconName, rs[Rs_iconName], CHAR_ST); |
1126 | |
1140 | |
1127 | classHint.res_name = (char *)rs[Rs_name]; |
1141 | classHint.res_name = (char *)rs[Rs_name]; |
1128 | classHint.res_class = (char *)RESCLASS; |
1142 | classHint.res_class = (char *)RESCLASS; |
1129 | |
1143 | |
1130 | wmHint.flags = (InputHint | StateHint | WindowGroupHint); |
1144 | wmHint.flags = InputHint | StateHint | WindowGroupHint; |
1131 | wmHint.input = True; |
1145 | wmHint.input = True; |
1132 | wmHint.initial_state = (Options & Opt_iconic ? IconicState |
1146 | wmHint.initial_state = Options & Opt_iconic ? IconicState : NormalState; |
1133 | : NormalState); |
|
|
1134 | wmHint.window_group = TermWin.parent[0]; |
1147 | wmHint.window_group = TermWin.parent[0]; |
1135 | |
1148 | |
1136 | XSetWMProperties (display->display, TermWin.parent[0], NULL, NULL, |
1149 | XSetWMProperties (display->display, TermWin.parent[0], NULL, NULL, |
1137 | (char **)argv, argc, &szHint, &wmHint, &classHint); |
1150 | (char **)argv, argc, &szHint, &wmHint, &classHint); |
|
|
1151 | |
|
|
1152 | #ifndef NO_FRILLS |
|
|
1153 | long pid = getpid (); |
|
|
1154 | XChangeProperty (display->display, TermWin.parent[0], |
|
|
1155 | display->atom ("_NET_WM_PID"), XA_CARDINAL, 32, |
|
|
1156 | PropModeReplace, (unsigned char *)&pid, 1); |
|
|
1157 | #endif |
1138 | |
1158 | |
1139 | XSelectInput (display->display, TermWin.parent[0], |
1159 | XSelectInput (display->display, TermWin.parent[0], |
1140 | KeyPressMask |
1160 | KeyPressMask |
1141 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
1161 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
1142 | | KeyReleaseMask |
1162 | | KeyReleaseMask |
1143 | #endif |
1163 | #endif |
1144 | | FocusChangeMask | VisibilityChangeMask |
1164 | | FocusChangeMask | VisibilityChangeMask |
1145 | | StructureNotifyMask); |
1165 | | StructureNotifyMask); |
1146 | termwin_ev.start (display, TermWin.parent[0]); |
1166 | termwin_ev.start (display, TermWin.parent[0]); |
1147 | |
1167 | |
1148 | /* vt cursor: Black-on-White is standard, but this is more popular */ |
1168 | /* vt cursor: Black-on-White is standard, but this is more popular */ |
1149 | TermWin_cursor = XCreateFontCursor (display->display, XC_xterm); |
1169 | TermWin_cursor = XCreateFontCursor (display->display, XC_xterm); |
1150 | |
1170 | |
… | |
… | |
1166 | } |
1186 | } |
1167 | #endif |
1187 | #endif |
1168 | |
1188 | |
1169 | /* the vt window */ |
1189 | /* the vt window */ |
1170 | TermWin.vt = XCreateSimpleWindow (display->display, TermWin.parent[0], |
1190 | TermWin.vt = XCreateSimpleWindow (display->display, TermWin.parent[0], |
1171 | window_vt_x, window_vt_y, |
1191 | window_vt_x, |
|
|
1192 | window_vt_y, |
1172 | TermWin_TotalWidth (), |
1193 | TermWin_TotalWidth (), |
1173 | TermWin_TotalHeight (), |
1194 | TermWin_TotalHeight (), |
1174 | 0, |
1195 | 0, |
1175 | PixColors[Color_fg], |
1196 | PixColors[Color_fg], |
1176 | PixColors[Color_bg]); |
1197 | PixColors[Color_bg]); |
1177 | |
|
|
1178 | #ifdef DEBUG_X |
1198 | #ifdef DEBUG_X |
1179 | XStoreName (display->display, TermWin.vt, "vt window"); |
1199 | XStoreName (display->display, TermWin.vt, "vt window"); |
1180 | #endif |
1200 | #endif |
1181 | |
1201 | |
|
|
1202 | attributes.bit_gravity = NorthWestGravity; |
|
|
1203 | XChangeWindowAttributes (display->display, TermWin.vt, CWBitGravity, &attributes); |
|
|
1204 | |
1182 | vt_emask = (ExposureMask | ButtonPressMask | ButtonReleaseMask |
1205 | vt_emask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PropertyChangeMask; |
1183 | | PropertyChangeMask); |
1206 | |
|
|
1207 | pointer_unblank (); |
1184 | |
1208 | |
1185 | #ifdef POINTER_BLANK |
1209 | #ifdef POINTER_BLANK |
1186 | pointer_unblank (); |
|
|
1187 | |
|
|
1188 | if ((Options & Opt_pointerBlank)) |
1210 | if (Options & Opt_pointerBlank) |
1189 | vt_emask |= PointerMotionMask; |
1211 | vt_emask |= PointerMotionMask; |
1190 | else |
1212 | else |
1191 | #endif |
1213 | #endif |
1192 | vt_emask |= (Button1MotionMask | Button3MotionMask); |
1214 | vt_emask |= Button1MotionMask | Button3MotionMask; |
1193 | |
1215 | |
1194 | XSelectInput (display->display, TermWin.vt, vt_emask); |
1216 | XSelectInput (display->display, TermWin.vt, vt_emask); |
1195 | vt_ev.start (display, TermWin.vt); |
1217 | vt_ev.start (display, TermWin.vt); |
1196 | |
1218 | |
1197 | #if defined(MENUBAR) && (MENUBAR_MAX > 1) |
1219 | #if defined(MENUBAR) && (MENUBAR_MAX > 1) |
… | |
… | |
1223 | |
1245 | |
1224 | #ifdef XPM_BACKGROUND |
1246 | #ifdef XPM_BACKGROUND |
1225 | if (rs[Rs_backgroundPixmap] != NULL |
1247 | if (rs[Rs_backgroundPixmap] != NULL |
1226 | && ! (Options & Opt_transparent)) |
1248 | && ! (Options & Opt_transparent)) |
1227 | { |
1249 | { |
1228 | const char *p = rs[Rs_backgroundPixmap]; |
1250 | const char *p = rs[Rs_backgroundPixmap]; |
1229 | |
1251 | |
1230 | if ((p = STRCHR (p, ';')) != NULL) |
1252 | if ((p = STRCHR (p, ';')) != NULL) |
1231 | { |
1253 | { |
1232 | p++; |
1254 | p++; |
1233 | scale_pixmap (p); |
1255 | scale_pixmap (p); |
… | |
… | |
1252 | topShadowGC = XCreateGC (display->display, TermWin.vt, GCForeground, &gcvalue); |
1274 | topShadowGC = XCreateGC (display->display, TermWin.vt, GCForeground, &gcvalue); |
1253 | gcvalue.foreground = PixColors[Color_bottomShadow]; |
1275 | gcvalue.foreground = PixColors[Color_bottomShadow]; |
1254 | botShadowGC = XCreateGC (display->display, TermWin.vt, GCForeground, &gcvalue); |
1276 | botShadowGC = XCreateGC (display->display, TermWin.vt, GCForeground, &gcvalue); |
1255 | gcvalue.foreground = PixColors[ (XDEPTH <= 2 ? Color_fg : Color_scroll)]; |
1277 | gcvalue.foreground = PixColors[ (XDEPTH <= 2 ? Color_fg : Color_scroll)]; |
1256 | scrollbarGC = XCreateGC (display->display, TermWin.vt, GCForeground, &gcvalue); |
1278 | scrollbarGC = XCreateGC (display->display, TermWin.vt, GCForeground, &gcvalue); |
|
|
1279 | #endif |
|
|
1280 | |
|
|
1281 | #ifdef OFF_FOCUS_FADING |
|
|
1282 | // initially we are in unfocused state |
|
|
1283 | if (rs[Rs_fade]) |
|
|
1284 | PixColors = PixColorsUnFocused; |
1257 | #endif |
1285 | #endif |
1258 | } |
1286 | } |
1259 | |
1287 | |
1260 | /*----------------------------------------------------------------------*/ |
1288 | /*----------------------------------------------------------------------*/ |
1261 | /* |
1289 | /* |