*** empty log message ***
authorroot <root>
Tue, 3 Aug 2004 22:19:51 +0000 (22:19 +0000)
committerroot <root>
Tue, 3 Aug 2004 22:19:51 +0000 (22:19 +0000)
src/init.C
src/xdefaults.C

index 7df28fba14584b05e6a060eada4f7ea03d8f232e..f60ad4f51e41eea3048af0455172aacc922b0c73 100644 (file)
@@ -884,7 +884,7 @@ rxvt_term::Get_Colours ()
   PixColors = PixColorsFocused;
 #endif
   
-  for (i = 0; i < (XDEPTH <= 2 ? 2 : NRS_COLORS); i++)
+  for (i = 0; i < (display->depth <= 2 ? 2 : NRS_COLORS); i++)
     {
       rxvt_color xcol;
 
@@ -936,7 +936,7 @@ rxvt_term::Get_Colours ()
       SET_PIXCOLOR (i);
     }
 
-  if (XDEPTH <= 2)
+  if (display->depth <= 2)
     {
       if (!rs[Rs_color + Color_pointer_fg]) PixColors[Color_pointer_fg] = PixColors[Color_fg];
       if (!rs[Rs_color + Color_pointer_bg]) PixColors[Color_pointer_bg] = PixColors[Color_bg];
@@ -951,7 +951,7 @@ rxvt_term::Get_Colours ()
    */
 #ifdef KEEP_SCROLLCOLOR
 
-  if (XDEPTH <= 2)
+  if (display->depth <= 2)
     {  /* Monochrome */
       PixColors[Color_scroll]       = PixColors[Color_fg];
       PixColors[Color_topShadow]    = PixColors[Color_bg];
@@ -1088,6 +1088,10 @@ rxvt_term::create_windows (int argc, const char *const *argv)
 {
   XClassHint classHint;
   XWMHints wmHint;
+#ifndef NO_FRILLS
+  Atom prop = None;
+  MWMHints mwmhints;
+#endif
   XGCValues gcvalue;
   long vt_emask;
   XSetWindowAttributes attributes;
@@ -1099,6 +1103,30 @@ rxvt_term::create_windows (int argc, const char *const *argv)
       display->depth = gattr.depth; // doh //TODO, per-term not per-display?
     }
 
+#ifndef NO_FRILLS
+  if (Options & Opt_borderLess)
+    {
+      prop = XInternAtom(display->display, "_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
+        {
+          mwmhints.flags = MWM_HINTS_DECORATIONS;
+          mwmhints.decorations = 0;
+        }
+    }
+  else
+    {
+      mwmhints.flags = 0;
+    }
+#endif
+
   /* grab colors before netscape does */
   Get_Colours ();
 
@@ -1162,9 +1190,18 @@ rxvt_term::create_windows (int argc, const char *const *argv)
                 | KeyReleaseMask
 #endif
                 | FocusChangeMask | VisibilityChangeMask
+                | ExposureMask
                 | StructureNotifyMask);
   termwin_ev.start (display, TermWin.parent[0]);
 
+#ifndef NO_FRILLS
+  if (mwmhints.flags)
+    {
+      prop = XInternAtom(display->display, "_MOTIF_WM_HINTS", False);
+      XChangeProperty(display->display, TermWin.parent[0], prop, prop, 32, PropModeReplace, (unsigned char *) &mwmhints, PROP_MWM_HINTS_ELEMENTS);
+    }
+#endif
+
   /* vt cursor: Black-on-White is standard, but this is more popular */
   TermWin_cursor = XCreateFontCursor (display->display, XC_xterm);
 
@@ -1274,7 +1311,7 @@ rxvt_term::create_windows (int argc, const char *const *argv)
   topShadowGC = XCreateGC (display->display, TermWin.vt, GCForeground, &gcvalue);
   gcvalue.foreground = PixColors[Color_bottomShadow];
   botShadowGC = XCreateGC (display->display, TermWin.vt, GCForeground, &gcvalue);
-  gcvalue.foreground = PixColors[ (XDEPTH <= 2 ? Color_fg : Color_scroll)];
+  gcvalue.foreground = PixColors[ (display->depth <= 2 ? Color_fg : Color_scroll)];
   scrollbarGC = XCreateGC (display->display, TermWin.vt, GCForeground, &gcvalue);
 #endif
 
index 3daa262874679c785f212a9b4453923e0d08811f..3ef077c06158b3fd2218e1f1b4c1babed8d3927f 100644 (file)
@@ -209,6 +209,7 @@ optList[] = {
               STRG (Rs_ext_bwidth, NULL, "bw", NULL, NULL),
               STRG (Rs_ext_bwidth, NULL, "borderwidth", NULL, NULL),
               STRG (Rs_int_bwidth, "internalBorder", "b", "number", "internal border in pixels"),
+              BOOL (Rs_borderLess, "borderLess", "bl", Opt_borderLess, "borderless window"),
 #endif
 #ifndef NO_LINESPACE
               STRG (Rs_lineSpace, "lineSpace", "lsp", "number", "number of extra pixels between rows"),