diff options
| author | Karoly Lorentey | 2004-12-08 23:58:40 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-12-08 23:58:40 +0000 |
| commit | 9d3d44ba8f401d92a6d9a08669856bf1328a270d (patch) | |
| tree | 40d4ee403b04decd77102e021e0c13ce62ec98ea /src | |
| parent | fa0a03c2a54e0eb6b06193b063bf6b6105e6a2a0 (diff) | |
| download | emacs-9d3d44ba8f401d92a6d9a08669856bf1328a270d.tar.gz emacs-9d3d44ba8f401d92a6d9a08669856bf1328a270d.zip | |
Trivial changes in x_create_tip_frame.
* 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
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/xfns.c b/src/xfns.c index 1679cc1c21d..2fe08e0a458 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -4506,6 +4506,7 @@ x_create_tip_frame (dpyinfo, parms, text) | |||
| 4506 | && !EQ (name, Qunbound) | 4506 | && !EQ (name, Qunbound) |
| 4507 | && !NILP (name)) | 4507 | && !NILP (name)) |
| 4508 | error ("Invalid frame name--not a string or nil"); | 4508 | error ("Invalid frame name--not a string or nil"); |
| 4509 | |||
| 4509 | Vx_resource_name = name; | 4510 | Vx_resource_name = name; |
| 4510 | 4511 | ||
| 4511 | frame = Qnil; | 4512 | frame = Qnil; |
| @@ -4563,6 +4564,16 @@ x_create_tip_frame (dpyinfo, parms, text) | |||
| 4563 | Lisp_Object black; | 4564 | Lisp_Object black; |
| 4564 | struct gcpro gcpro1; | 4565 | struct gcpro gcpro1; |
| 4565 | 4566 | ||
| 4567 | /* Function x_decode_color can signal an error. Make | ||
| 4568 | sure to initialize color slots so that we won't try | ||
| 4569 | to free colors we haven't allocated. */ | ||
| 4570 | f->output_data.x->foreground_pixel = -1; | ||
| 4571 | f->output_data.x->background_pixel = -1; | ||
| 4572 | f->output_data.x->cursor_pixel = -1; | ||
| 4573 | f->output_data.x->cursor_foreground_pixel = -1; | ||
| 4574 | f->output_data.x->border_pixel = -1; | ||
| 4575 | f->output_data.x->mouse_pixel = -1; | ||
| 4576 | |||
| 4566 | black = build_string ("black"); | 4577 | black = build_string ("black"); |
| 4567 | GCPRO1 (black); | 4578 | GCPRO1 (black); |
| 4568 | f->output_data.x->foreground_pixel | 4579 | f->output_data.x->foreground_pixel |
| @@ -4638,7 +4649,7 @@ x_create_tip_frame (dpyinfo, parms, text) | |||
| 4638 | x_default_parameter (f, parms, Qborder_width, make_number (2), | 4649 | x_default_parameter (f, parms, Qborder_width, make_number (2), |
| 4639 | "borderWidth", "BorderWidth", RES_TYPE_NUMBER); | 4650 | "borderWidth", "BorderWidth", RES_TYPE_NUMBER); |
| 4640 | 4651 | ||
| 4641 | /* This defaults to 2 in order to match xterm. We recognize either | 4652 | /* This defaults to 1 in order to match xterm. We recognize either |
| 4642 | internalBorderWidth or internalBorder (which is what xterm calls | 4653 | internalBorderWidth or internalBorder (which is what xterm calls |
| 4643 | it). */ | 4654 | it). */ |
| 4644 | if (NILP (Fassq (Qinternal_border_width, parms))) | 4655 | if (NILP (Fassq (Qinternal_border_width, parms))) |