--- rxvt-unicode/src/init.C 2006/01/17 12:22:59 1.145 +++ rxvt-unicode/src/init.C 2006/01/20 11:02:46 1.150 @@ -205,10 +205,6 @@ "_XROOTPMAP_ID", "ESETROOT_PMAP_ID", #endif -#ifdef OFFIX_DND - "DndProtocol", - "DndSelection", -#endif #if ENABLE_XEMBED "_XEMBED", "_XEMBED_INFO", @@ -930,17 +926,25 @@ display->depth = gattr.depth; // doh //TODO, per-term not per-display? } + /* grab colors before netscape does */ + Get_Colours (); + + if (!set_fonts ()) + rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n"); + + parent = DefaultRootWindow (disp); + + attributes.override_redirect = !!OPTION (Opt_override_redirect); + #if ENABLE_FRILLS if (OPTION (Opt_borderLess)) { - prop = XInternAtom(disp, "_MOTIF_WM_INFO", True); + prop = XInternAtom (disp, "_MOTIF_WM_INFO", True); if (prop == None) { /* print_warning("Window Manager does not support MWM hints. Bypassing window manager control for borderless window.\n");*/ -#ifdef PREFER_24BIT attributes.override_redirect = TRUE; -#endif mwmhints.flags = 0; } else @@ -953,14 +957,6 @@ mwmhints.flags = 0; #endif - /* grab colors before netscape does */ - Get_Colours (); - - if (!set_fonts ()) - rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n"); - - parent = DefaultRootWindow (disp); - #if ENABLE_XEMBED if (rs[Rs_embed]) { @@ -978,7 +974,6 @@ window_calc (0, 0); /* sub-window placement & size in rxvt_resize_subwindows () */ -#ifdef PREFER_24BIT attributes.background_pixel = pix_colors_focused[Color_border]; attributes.border_pixel = pix_colors_focused[Color_border]; attributes.colormap = display->cmap; @@ -988,15 +983,8 @@ ext_bwidth, display->depth, InputOutput, display->visual, - CWColormap | CWBackPixel | CWBorderPixel, &attributes); -#else - top = XCreateSimpleWindow (disp, parent, - szHint.x, szHint.y, - szHint.width, szHint.height, - ext_bwidth, - pix_colors_focused[Color_border], - pix_colors_focused[Color_border]); -#endif + CWColormap | CWBackPixel | CWBorderPixel | CWOverrideRedirect, + &attributes); this->parent[0] = top; @@ -1445,26 +1433,16 @@ _exit (EXIT_FAILURE); default: - { -#if defined(HAVE_STRUCT_UTMP) && defined(HAVE_TTYSLOT) - int fdstdin; - - fdstdin = dup (STDIN_FILENO); - dup2 (pty->tty, STDIN_FILENO); +#if UTMP_SUPPORT + if (!OPTION (Opt_utmpInhibit)) + pty->login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]); #endif -#ifdef UTMP_SUPPORT - privileged_utmp (SAVE); -#endif + pty->close_tty (); -#if defined(HAVE_STRUCT_UTMP) && defined(HAVE_TTYSLOT) + child_ev.start (cmd_pid); - dup2 (fdstdin, STDIN_FILENO); - close (fdstdin); -#endif - } - - pty->close_tty (); + HOOK_INVOKE ((this, HOOK_CHILD_START, DT_INT, cmd_pid, DT_END)); break; } }