… | |
… | |
44 | { |
44 | { |
45 | COLOR_FOREGROUND, |
45 | COLOR_FOREGROUND, |
46 | COLOR_BACKGROUND, |
46 | COLOR_BACKGROUND, |
47 | /* low-intensity colors */ |
47 | /* low-intensity colors */ |
48 | "Black", /* 0: black (#000000) */ |
48 | "Black", /* 0: black (#000000) */ |
49 | #ifndef NO_BRIGHTCOLOR |
|
|
50 | "Red3", /* 1: red (#CD0000) */ |
49 | "Red3", /* 1: red (#CD0000) */ |
51 | "Green3", /* 2: green (#00CD00) */ |
50 | "Green3", /* 2: green (#00CD00) */ |
52 | "Yellow3", /* 3: yellow (#CDCD00) */ |
51 | "Yellow3", /* 3: yellow (#CDCD00) */ |
53 | "Blue3", /* 4: blue (#0000CD) */ |
52 | "Blue3", /* 4: blue (#0000CD) */ |
54 | "Magenta3", /* 5: magenta (#CD00CD) */ |
53 | "Magenta3", /* 5: magenta (#CD00CD) */ |
… | |
… | |
62 | # ifdef XTERM_COLORS |
61 | # ifdef XTERM_COLORS |
63 | "Grey30", /* 8: bright black (#4D4D4D) */ |
62 | "Grey30", /* 8: bright black (#4D4D4D) */ |
64 | # else |
63 | # else |
65 | "Grey25", /* 8: bright black (#404040) */ |
64 | "Grey25", /* 8: bright black (#404040) */ |
66 | # endif |
65 | # endif |
67 | #endif /* NO_BRIGHTCOLOR */ |
|
|
68 | "Red", /* 1/9: bright red (#FF0000) */ |
66 | "Red", /* 1/9: bright red (#FF0000) */ |
69 | "Green", /* 2/10: bright green (#00FF00) */ |
67 | "Green", /* 2/10: bright green (#00FF00) */ |
70 | "Yellow", /* 3/11: bright yellow (#FFFF00) */ |
68 | "Yellow", /* 3/11: bright yellow (#FFFF00) */ |
71 | "Blue", /* 4/12: bright blue (#0000FF) */ |
69 | "Blue", /* 4/12: bright blue (#0000FF) */ |
72 | "Magenta", /* 5/13: bright magenta (#FF00FF) */ |
70 | "Magenta", /* 5/13: bright magenta (#FF00FF) */ |
… | |
… | |
808 | int i = atoi (rs[Rs_color + idx]); |
806 | int i = atoi (rs[Rs_color + idx]); |
809 | |
807 | |
810 | if (i >= 8 && i <= 15) |
808 | if (i >= 8 && i <= 15) |
811 | { /* bright colors */ |
809 | { /* bright colors */ |
812 | i -= 8; |
810 | i -= 8; |
813 | #ifndef NO_BRIGHTCOLOR |
|
|
814 | rs[Rs_color + idx] = rs[Rs_color + minBrightCOLOR + i]; |
811 | rs[Rs_color + idx] = rs[Rs_color + minBrightCOLOR + i]; |
815 | return; |
812 | return; |
816 | #endif |
|
|
817 | } |
813 | } |
818 | |
814 | |
819 | if (i >= 0 && i <= 7) /* normal colors */ |
815 | if (i >= 0 && i <= 7) /* normal colors */ |
820 | rs[Rs_color + idx] = rs[Rs_color + minCOLOR + i]; |
816 | rs[Rs_color + idx] = rs[Rs_color + minCOLOR + i]; |
821 | } |
817 | } |
… | |
… | |
1036 | #endif |
1032 | #endif |
1037 | }; |
1033 | }; |
1038 | |
1034 | |
1039 | XSetWMProtocols (disp, top, protocols, sizeof (protocols) / sizeof (protocols[0])); |
1035 | XSetWMProtocols (disp, top, protocols, sizeof (protocols) / sizeof (protocols[0])); |
1040 | |
1036 | |
|
|
1037 | #if ENABLE_FRILLS |
|
|
1038 | if (rs[Rs_transient_for]) |
|
|
1039 | XSetTransientForHint (disp, top, (Window)strtol (rs[Rs_transient_for], 0, 0)); |
|
|
1040 | #endif |
|
|
1041 | |
1041 | #if ENABLE_EWMH |
1042 | #if ENABLE_EWMH |
1042 | long pid = getpid (); |
1043 | long pid = getpid (); |
1043 | |
1044 | |
1044 | XChangeProperty (disp, top, |
1045 | XChangeProperty (disp, top, |
1045 | xa[XA_NET_WM_PID], XA_CARDINAL, 32, |
1046 | xa[XA_NET_WM_PID], XA_CARDINAL, 32, |
… | |
… | |
1088 | attributes.bit_gravity = NorthWestGravity; |
1089 | attributes.bit_gravity = NorthWestGravity; |
1089 | XChangeWindowAttributes (disp, vt, CWBitGravity, &attributes); |
1090 | XChangeWindowAttributes (disp, vt, CWBitGravity, &attributes); |
1090 | |
1091 | |
1091 | vt_emask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PropertyChangeMask; |
1092 | vt_emask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PropertyChangeMask; |
1092 | |
1093 | |
1093 | #ifdef POINTER_BLANK |
|
|
1094 | if (OPTION (Opt_pointerBlank)) |
1094 | if (OPTION (Opt_pointerBlank) |
|
|
1095 | #ifdef ENABLE_PERL |
|
|
1096 | || self |
|
|
1097 | #endif |
|
|
1098 | ) |
1095 | vt_emask |= PointerMotionMask; |
1099 | vt_emask |= PointerMotionMask; |
1096 | else |
1100 | else |
1097 | #endif |
|
|
1098 | vt_emask |= Button1MotionMask | Button3MotionMask; |
1101 | vt_emask |= Button1MotionMask | Button3MotionMask; |
1099 | |
1102 | |
1100 | XSelectInput (disp, vt, vt_emask); |
1103 | XSelectInput (disp, vt, vt_emask); |
1101 | vt_ev.start (display, vt); |
1104 | vt_ev.start (display, vt); |
1102 | |
1105 | |
… | |
… | |
1406 | #if ENABLE_FRILLS |
1409 | #if ENABLE_FRILLS |
1407 | if (rs[Rs_pty_fd]) |
1410 | if (rs[Rs_pty_fd]) |
1408 | { |
1411 | { |
1409 | pty.pty = atoi (rs[Rs_pty_fd]); |
1412 | pty.pty = atoi (rs[Rs_pty_fd]); |
1410 | |
1413 | |
|
|
1414 | if (pty.pty >= 0) |
|
|
1415 | { |
1411 | if (getfd_hook) |
1416 | if (getfd_hook) |
1412 | pty.pty = (*getfd_hook) (pty.pty); |
1417 | pty.pty = (*getfd_hook) (pty.pty); |
1413 | |
1418 | |
1414 | if (pty.pty < 0 || fcntl (pty.pty, F_SETFL, O_NONBLOCK)) |
1419 | if (pty.pty < 0 || fcntl (pty.pty, F_SETFL, O_NONBLOCK)) |
1415 | rxvt_fatal ("unusable pty-fd filehandle, aborting.\n"); |
1420 | rxvt_fatal ("unusable pty-fd filehandle, aborting.\n"); |
|
|
1421 | } |
1416 | } |
1422 | } |
1417 | else |
1423 | else |
1418 | #endif |
1424 | #endif |
1419 | if (!pty.get ()) |
1425 | if (!pty.get ()) |
1420 | rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); |
1426 | rxvt_fatal ("can't initialize pseudo-tty, aborting.\n"); |