*** empty log message ***
authorroot <root>
Mon, 14 Feb 2005 20:46:47 +0000 (20:46 +0000)
committerroot <root>
Mon, 14 Feb 2005 20:46:47 +0000 (20:46 +0000)
Changes
src/rxvtc.C
src/rxvtd.C
src/rxvtfont.C

diff --git a/Changes b/Changes
index e76d97fb7c326aa4098943893cb31e228ba22295..af35f3de8d98e56f718dae66ec38c25d1d6849a0 100644 (file)
--- a/Changes
+++ b/Changes
@@ -16,16 +16,16 @@ WISH: just for fun, do shade and tint with XRender.
           for empty keymaps which could result in crashes
           (Kuang-che Wu).
         - new option: -embed (frills). somebody could write a simple
-          tk script to make a tabbable terminal now.
+          tk script to make a tab'able terminal now...
         - only warn on X errors, *try* to continue (frills).
         - add COPYING back, which got lost somehow.
         - after deciding that LSM is dead, remove all traces of it,
           along with other, similar, cleanups.
         - _try_ to react sensibly to some non-monotonic time changes.
         - don't crash in urxvtc when getcwd fails (reported by Paco-Paco).
-        - tweak font searching algorithm a bit to get faster and be
-          more compatible with the font older rxvt-unicode versions chose
-          (reported by Paco-Paco).
+        - tweak font searching algorithm a bit to be faster and more
+          compatible with older rxvt-unicode versions when multiple fonts
+          match (reported by Paco-Paco).
         - urxvtd tries to stay in "/" whenever possible.
 
 5.0  Fri Feb 11 18:31:48 CET 2005
index 8f70becb18d4fe66e971ae507b434a23542948be..f4db4d1b27681963f60280db7b780f5cc3c6cdb2 100644 (file)
@@ -65,8 +65,6 @@ int
 main (int argc, const char *const *argv)
 {
   client c;
-  char buf[PATH_MAX];
-
   {
     sigset_t ss;
 
@@ -76,8 +74,17 @@ main (int argc, const char *const *argv)
   }
 
   c.send ("NEW");
+
   // instead of getcwd we could opendir (".") and pass the fd for fchdir *g*
-  c.send ("CWD"), c.send (getcwd (buf, sizeof (buf)));
+  char cwd[PATH_MAX];
+
+  if (!getcwd (cwd, sizeof (cwd)))
+    {
+      perror ("unable to determine current working directory");
+      exit (EXIT_FAILURE);
+    }
+
+  c.send ("CWD"), c.send (cwd);
 
   for (char **var = environ; *environ; environ++)
     c.send ("ENV"), c.send (*environ);
index 67048a5f7955a5a0307dd70f5e2cdced66700136..6c56f4b2e3eaa2ede4e7bd58ebfc494c409d1a7e 100644 (file)
@@ -196,6 +196,7 @@ void server::read_cb (io_watcher &w, short revents)
             term->log_hook = 0;
 
             environ = old_environ;
+            chdir ("/");
 
             if (!success)
               term->destroy ();
@@ -215,6 +216,8 @@ main (int argc, const char *const *argv)
 {
   rxvt_init ();
 
+  chdir ("/");
+
   char *sockname = rxvt_connection::unix_sockname ();
   unix_listener l (sockname);
   printf ("rxvt-unicode daemon listening on %s.\n", sockname);
index 22e677eb5f12d53ae2701040e95a0343251b002d..2c0fdd0f3dbab8a7d90261df5be56bd38988ce2e 100644 (file)
@@ -718,6 +718,8 @@ rxvt_font_x11::load (const rxvt_fontprop &prop)
 
       if (replace_field (fname, list[i], 6, '0', field_str))
         diff += 10; // slightly penalize scalable fonts
+      else if (replace_field (fname, list[i], 11, '0', "0"))
+        diff += 300; // more heavily penalize what looks like scaled bitmap fotns
 
       if (!set_properties (p, fname))
         continue;
@@ -743,7 +745,7 @@ rxvt_font_x11::load (const rxvt_fontprop &prop)
       font_weight *best = fonts + count - 1;
 
       for (font_weight *w = best; w-- > fonts; )
-        if (w->diff < best->diff)
+        if (w->diff <= best->diff)
           best = w;
 
       if (!best->name
@@ -1098,7 +1100,7 @@ rxvt_font_xft::load (const rxvt_fontprop &prop)
   FcValue v;
 
   if (prop.height != rxvt_fontprop::unset
-      || (FcPatternGet (p, FC_PIXEL_SIZE, 0, &v) != FcResultMatch
+      && (FcPatternGet (p, FC_PIXEL_SIZE, 0, &v) != FcResultMatch
           && FcPatternGet (p, FC_SIZE, 0, &v) != FcResultMatch))
     FcPatternAddInteger (p, FC_PIXEL_SIZE, prop.height);