… | |
… | |
928 | { |
928 | { |
929 | XGetWindowAttributes (disp, RootWindow (disp, display->screen), &gattr); |
929 | XGetWindowAttributes (disp, RootWindow (disp, display->screen), &gattr); |
930 | display->depth = gattr.depth; // doh //TODO, per-term not per-display? |
930 | display->depth = gattr.depth; // doh //TODO, per-term not per-display? |
931 | } |
931 | } |
932 | |
932 | |
|
|
933 | /* grab colors before netscape does */ |
|
|
934 | Get_Colours (); |
|
|
935 | |
|
|
936 | if (!set_fonts ()) |
|
|
937 | rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n"); |
|
|
938 | |
|
|
939 | parent = DefaultRootWindow (disp); |
|
|
940 | |
|
|
941 | attributes.override_redirect = !!OPTION (Opt_override_redirect); |
|
|
942 | |
933 | #if ENABLE_FRILLS |
943 | #if ENABLE_FRILLS |
934 | if (OPTION (Opt_borderLess)) |
944 | if (OPTION (Opt_borderLess)) |
935 | { |
945 | { |
936 | prop = XInternAtom(disp, "_MOTIF_WM_INFO", True); |
946 | prop = XInternAtom (disp, "_MOTIF_WM_INFO", True); |
937 | |
947 | |
938 | if (prop == None) |
948 | if (prop == None) |
939 | { |
949 | { |
940 | /* print_warning("Window Manager does not support MWM hints. Bypassing window manager control for borderless window.\n");*/ |
950 | /* print_warning("Window Manager does not support MWM hints. Bypassing window manager control for borderless window.\n");*/ |
941 | #ifdef PREFER_24BIT |
|
|
942 | attributes.override_redirect = TRUE; |
951 | attributes.override_redirect = TRUE; |
943 | #endif |
|
|
944 | mwmhints.flags = 0; |
952 | mwmhints.flags = 0; |
945 | } |
953 | } |
946 | else |
954 | else |
947 | { |
955 | { |
948 | mwmhints.flags = MWM_HINTS_DECORATIONS; |
956 | mwmhints.flags = MWM_HINTS_DECORATIONS; |
… | |
… | |
951 | } |
959 | } |
952 | else |
960 | else |
953 | mwmhints.flags = 0; |
961 | mwmhints.flags = 0; |
954 | #endif |
962 | #endif |
955 | |
963 | |
956 | /* grab colors before netscape does */ |
|
|
957 | Get_Colours (); |
|
|
958 | |
|
|
959 | if (!set_fonts ()) |
|
|
960 | rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n"); |
|
|
961 | |
|
|
962 | parent = DefaultRootWindow (disp); |
|
|
963 | |
|
|
964 | #if ENABLE_XEMBED |
964 | #if ENABLE_XEMBED |
965 | if (rs[Rs_embed]) |
965 | if (rs[Rs_embed]) |
966 | { |
966 | { |
967 | XWindowAttributes wattr; |
967 | XWindowAttributes wattr; |
968 | |
968 | |
… | |
… | |
976 | #endif |
976 | #endif |
977 | |
977 | |
978 | window_calc (0, 0); |
978 | window_calc (0, 0); |
979 | |
979 | |
980 | /* sub-window placement & size in rxvt_resize_subwindows () */ |
980 | /* sub-window placement & size in rxvt_resize_subwindows () */ |
981 | #ifdef PREFER_24BIT |
|
|
982 | attributes.background_pixel = pix_colors_focused[Color_border]; |
981 | attributes.background_pixel = pix_colors_focused[Color_border]; |
983 | attributes.border_pixel = pix_colors_focused[Color_border]; |
982 | attributes.border_pixel = pix_colors_focused[Color_border]; |
984 | attributes.colormap = display->cmap; |
983 | attributes.colormap = display->cmap; |
985 | top = XCreateWindow (disp, parent, |
984 | top = XCreateWindow (disp, parent, |
986 | szHint.x, szHint.y, |
985 | szHint.x, szHint.y, |
987 | szHint.width, szHint.height, |
986 | szHint.width, szHint.height, |
988 | ext_bwidth, |
987 | ext_bwidth, |
989 | display->depth, InputOutput, |
988 | display->depth, InputOutput, |
990 | display->visual, |
989 | display->visual, |
991 | CWColormap | CWBackPixel | CWBorderPixel, &attributes); |
990 | CWColormap | CWBackPixel | CWBorderPixel | CWOverrideRedirect, |
992 | #else |
991 | &attributes); |
993 | top = XCreateSimpleWindow (disp, parent, |
|
|
994 | szHint.x, szHint.y, |
|
|
995 | szHint.width, szHint.height, |
|
|
996 | ext_bwidth, |
|
|
997 | pix_colors_focused[Color_border], |
|
|
998 | pix_colors_focused[Color_border]); |
|
|
999 | #endif |
|
|
1000 | |
992 | |
1001 | this->parent[0] = top; |
993 | this->parent[0] = top; |
1002 | |
994 | |
1003 | old_width = szHint.width; |
995 | old_width = szHint.width; |
1004 | old_height = szHint.height; |
996 | old_height = szHint.height; |
… | |
… | |
1443 | } |
1435 | } |
1444 | |
1436 | |
1445 | _exit (EXIT_FAILURE); |
1437 | _exit (EXIT_FAILURE); |
1446 | |
1438 | |
1447 | default: |
1439 | default: |
|
|
1440 | #if UTMP_SUPPORT |
1448 | if (!OPTION (Opt_utmpInhibit)) |
1441 | if (!OPTION (Opt_utmpInhibit)) |
1449 | pty->login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]); |
1442 | pty->login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]); |
|
|
1443 | #endif |
1450 | |
1444 | |
1451 | pty->close_tty (); |
1445 | pty->close_tty (); |
1452 | break; |
1446 | break; |
1453 | } |
1447 | } |
1454 | } |
1448 | } |