*** empty log message ***
authorroot <root>
Wed, 18 Jan 2006 19:43:51 +0000 (19:43 +0000)
committerroot <root>
Wed, 18 Jan 2006 19:43:51 +0000 (19:43 +0000)
Changes
doc/rxvt.1.pod
src/init.C
src/optinc.h
src/rsinc.h
src/urxvt.pm
src/xdefaults.C

diff --git a/Changes b/Changes
index 4412e1cced55312d9cdde0f1ed5f8ce3338a0ade..695bbffda334b2d1e4b48cccb9cf0bf909152405 100644 (file)
--- 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).
index 04df795a04c4a08d20181007de1a469697265496..0efce5bcadd10469072c47346f26f1ff2cf351c1 100644 (file)
@@ -299,6 +299,11 @@ Compile I<frills>: 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<borderLess>.
 
+=item B<-override-redirect>
+
+Compile I<frills>: Sets override-redirect on the window; resource
+B<override-redirect>.
+
 =item B<-sbg>
 
 Compile I<frills>: 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<keysym> following.
 
-=item B<secondaryScreen:> I<bool>
+=item B<secondaryScreen:> I<boolean>
 
 Turn on/off secondary screen (default enabled).
 
-=item B<secondaryScroll:> I<bool>
+=item B<secondaryScroll:> I<boolean>
 
 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<hold>: I<bool>
+=item B<hold>: I<boolean>
 
 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<selection-popup> and C<mark-urls> perl extensions.
 
 =item B<transient-for>: I<windowid>
 
-Sets the WM_TRANSIENT_FOR property to the given window iw.
+Compile I<frills>: Sets the WM_TRANSIENT_FOR property to the given window id.
+
+=item B<override-redirect>: I<boolean>
+
+Compile I<frills>: Sets override-redirect for the terminal window, making
+it almost invisible to window managers; option B<-override-redirect>.
 
 =back
 
index 63664aad616bf9d4a50c8e14733086e824321e9b..08c110b881c82943e3084d97df63605e3933c5d1 100644 (file)
@@ -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;
 
index efd79eda964f31ed4a07ff89a646dd24c9e9ec23..fee0e0845509901e094d1f24cab40949fae672fd 100644 (file)
  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
index 36aab7ea515a5d2b303a75841a8154ece3563670..48db0a4f26696b3306dfab1331d6c802ef58b483 100644 (file)
@@ -65,6 +65,7 @@
 #endif
 #if ENABLE_FRILLS
   def (transient_for)
+  def (override_redirect)
   def (pty_fd)
   def (hold)
   def (ext_bwidth)
index 2e5ff7bbbecd9fb5fbce1a9257a8d4b71e77c028..c850fb8266a5aa911f7d1c17447292e21741989b 100644 (file)
@@ -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")
index fe3c2bb2d354d3f35c6bae7f638224f091667580..645a5cecb407a4f08b84e49c681eadc746052528 100644 (file)
@@ -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"),