From: root Date: Wed, 18 Jan 2006 19:43:51 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=580639c65925f30c68c23296b15852a5e9d725ac;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/Changes b/Changes index 4412e1cc..695bbffd 100644 --- a/Changes +++ b/Changes @@ -37,6 +37,8 @@ TODO: distributed clipboard example :-> Matching is now done on UTF-8, which makes it almost instant. - perl/selection, perl/selection-autotransform: regexes are now being interpreted in the locale urxvt was started. + - implemented override-redirect option and enabled it on menus, + as kwin puts our windows behind the terminal (what a shoddy wm). - fixed struct utmp check in configure for OpenBSD. - complete overhaul of the pty/utmp management stuff and configure (Emanuele Giaquinta). diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod index 04df795a..0efce5bc 100644 --- a/doc/rxvt.1.pod +++ b/doc/rxvt.1.pod @@ -299,6 +299,11 @@ Compile I: Set MWM hints to request a borderless window, i.e. if honoured by the WM, the rxvt-unicode window will not have window decorations; resource B. +=item B<-override-redirect> + +Compile I: Sets override-redirect on the window; resource +B. + =item B<-sbg> Compile I: Disable the usage of the built-in block graphics/line @@ -954,18 +959,18 @@ Specify the reply rxvt-unicode sends to the shell when an ENQ (control-E) character is passed through. It may contain escape values as described in the entry on B following. -=item B I +=item B I Turn on/off secondary screen (default enabled). -=item B I +=item B I Turn on/off secondary screen scroll (default enabled). If the this option is enabled, scrolls on the secondary screen will change the scrollback buffer and switching to/from the secondary screen will instead scroll the screen up. -=item B: I +=item B: I Turn on/off hold window after exit support. If enabled, @@RXVT_NAME@@ will not immediately destroy its window when the program executed within @@ -1130,7 +1135,12 @@ C and C perl extensions. =item B: I -Sets the WM_TRANSIENT_FOR property to the given window iw. +Compile I: Sets the WM_TRANSIENT_FOR property to the given window id. + +=item B: I + +Compile I: Sets override-redirect for the terminal window, making +it almost invisible to window managers; option B<-override-redirect>. =back diff --git a/src/init.C b/src/init.C index 63664aad..08c110b8 100644 --- a/src/init.C +++ b/src/init.C @@ -930,17 +930,25 @@ rxvt_term::create_windows (int argc, const char *const *argv) 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 +961,6 @@ rxvt_term::create_windows (int argc, const char *const *argv) 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 +978,6 @@ rxvt_term::create_windows (int argc, const char *const *argv) 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 +987,8 @@ rxvt_term::create_windows (int argc, const char *const *argv) 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; diff --git a/src/optinc.h b/src/optinc.h index efd79eda..fee0e084 100644 --- a/src/optinc.h +++ b/src/optinc.h @@ -30,15 +30,17 @@ def(insecure, 24) // insecure esc sequences def(borderLess, 25) // mwm borderless hints def(hold, 26) // hold window open after exit - def(skipBuiltinGlyphs, 27) // do not use internal glyphs + def(override_redirect, 27) + def(skipBuiltinGlyphs, 28) // do not use internal glyphs #else nodef(insecure) nodef(borderLess) nodef(hold) nodef(skipBuiltinGlyphs) + nodef(override_redirect) #endif #if ENABLE_STYLES - def(intensityStyles, 28) // font styles imply intensity + def(intensityStyles, 29) // font styles imply intensity #else nodef(intensityStyles) #endif diff --git a/src/rsinc.h b/src/rsinc.h index 36aab7ea..48db0a4f 100644 --- a/src/rsinc.h +++ b/src/rsinc.h @@ -65,6 +65,7 @@ #endif #if ENABLE_FRILLS def (transient_for) + def (override_redirect) def (pty_fd) def (hold) def (ext_bwidth) diff --git a/src/urxvt.pm b/src/urxvt.pm index 2e5ff7bb..c850fb82 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -1603,7 +1603,8 @@ sub show { urxvt::term->new ($env, "popup", "--perl-lib" => "", "--perl-ext-common" => "", - "-pty-fd" => -1, "-sl" => 0, "-b" => 1, "-bd" => "grey80", "-bl", "-override-redirect", + "-pty-fd" => -1, "-sl" => 0, + "-b" => 1, "-bd" => "grey80", "-bl", "-override-redirect", "--transient-for" => $self->{term}->parent, "-display" => $self->{term}->display_id, "-pe" => "urxvt-popup") diff --git a/src/xdefaults.C b/src/xdefaults.C index fe3c2bb2..645a5cec 100644 --- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -217,6 +217,7 @@ optList[] = { #endif #if ENABLE_FRILLS RSTRG (Rs_transient_for, "transient-for", "windowid"), + BOOL (Rs_override_redirect, "override-redirect", "override-redirect", Opt_override_redirect, "set override-redirect on the terminal window"), STRG (Rs_pty_fd, NULL, "pty-fd", "fileno", "file descriptor of pty to use"), BOOL (Rs_hold, "hold", "hold", Opt_hold, "retain window after shell exit"), STRG (Rs_ext_bwidth, "externalBorder", "w", "number", "external border in pixels"),