]> git.eshelyaron.com Git - emacs.git/commitdiff
Trivial changes in x_create_tip_frame.
authorKaroly Lorentey <lorentey@elte.hu>
Wed, 8 Dec 2004 23:58:40 +0000 (23:58 +0000)
committerKaroly Lorentey <lorentey@elte.hu>
Wed, 8 Dec 2004 23:58:40 +0000 (23:58 +0000)
* src/xfns.c (x_create_tip_frame): Copy color slot initialization
  safeguards from x-create-frame.  Trivial doc update.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-274

README.multi-tty
src/xfns.c

index e400eab66fc407b46dbbe3f491a071ec821938da..8a578937aaf6ef3580844e893cc9792a3066cdd2 100644 (file)
@@ -376,6 +376,10 @@ THINGS TO DO
 
 ** Check if we got term-setup-hook right.
 
+** I think tip_frame should be display-local.
+
+** Check display reference count handling in x_create_tip_frame.
+
 ** make-frame does not correctly handle extra parameters in its
    argument:
 
index 1679cc1c21df2fe85c87adcd0f26295dff1aa05f..2fe08e0a4580c2f5256b63a4685b72a3801af47c 100644 (file)
@@ -4506,6 +4506,7 @@ x_create_tip_frame (dpyinfo, parms, text)
       && !EQ (name, Qunbound)
       && !NILP (name))
     error ("Invalid frame name--not a string or nil");
+
   Vx_resource_name = name;
 
   frame = Qnil;
@@ -4563,6 +4564,16 @@ x_create_tip_frame (dpyinfo, parms, text)
     Lisp_Object black;
     struct gcpro gcpro1;
 
+    /* Function x_decode_color can signal an error.  Make
+       sure to initialize color slots so that we won't try
+       to free colors we haven't allocated.  */
+    f->output_data.x->foreground_pixel = -1;
+    f->output_data.x->background_pixel = -1;
+    f->output_data.x->cursor_pixel = -1;
+    f->output_data.x->cursor_foreground_pixel = -1;
+    f->output_data.x->border_pixel = -1;
+    f->output_data.x->mouse_pixel = -1;
+
     black = build_string ("black");
     GCPRO1 (black);
     f->output_data.x->foreground_pixel
@@ -4638,7 +4649,7 @@ x_create_tip_frame (dpyinfo, parms, text)
   x_default_parameter (f, parms, Qborder_width, make_number (2),
                       "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
 
-  /* This defaults to 2 in order to match xterm.  We recognize either
+  /* This defaults to 1 in order to match xterm.  We recognize either
      internalBorderWidth or internalBorder (which is what xterm calls
      it).  */
   if (NILP (Fassq (Qinternal_border_width, parms)))