aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2010-07-02 12:35:08 -0400
committerChong Yidong2010-07-02 12:35:08 -0400
commit54ee7410c5a6301f37cb107317a5533c0bcc3cf9 (patch)
tree72d4012617229fe56396885d25fe6f3944864fe7 /src
parentd0cb23caf4c6a1fffaceddecc3eadb80c8948176 (diff)
downloademacs-54ee7410c5a6301f37cb107317a5533c0bcc3cf9.tar.gz
emacs-54ee7410c5a6301f37cb107317a5533c0bcc3cf9.zip
Fix faulty `if' statement in delete_frame.
* frame.c (Qtooltip): New var. (delete_frame): Use it. Fix faulty if statement. Don't update mode line for tooltip frames. Suggested by Martin Rudalics. * xfns.c (x_create_tip_frame): * w32fns.c (x_create_tip_frame): Use it.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/frame.c14
-rw-r--r--src/w32fns.c5
-rw-r--r--src/xfns.c7
4 files changed, 25 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0db4a543ab7..77581160a0e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12010-07-02 Chong Yidong <cyd@stupidchicken.com>
2
3 * frame.c (Qtooltip): New var.
4 (delete_frame): Use it. Fix faulty if statement. Don't update
5 mode line for tooltip frames. Suggested by Martin Rudalics.
6
7 * xfns.c (x_create_tip_frame):
8 * w32fns.c (x_create_tip_frame): Use it.
9
12010-06-30 Naohiro Aota <naota@elisp.net> (tiny change) 102010-06-30 Naohiro Aota <naota@elisp.net> (tiny change)
2 11
3 * xftfont.c (xftfont_open): Check font width one by one also when 12 * xftfont.c (xftfont_open): Check font width one by one also when
diff --git a/src/frame.c b/src/frame.c
index 5915c00bca1..a30d1e18175 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -100,6 +100,7 @@ Lisp_Object Qgeometry; /* Not used */
100Lisp_Object Qheight, Qwidth; 100Lisp_Object Qheight, Qwidth;
101Lisp_Object Qleft, Qright; 101Lisp_Object Qleft, Qright;
102Lisp_Object Qicon_left, Qicon_top, Qicon_type, Qicon_name; 102Lisp_Object Qicon_left, Qicon_top, Qicon_type, Qicon_name;
103Lisp_Object Qtooltip;
103Lisp_Object Qinternal_border_width; 104Lisp_Object Qinternal_border_width;
104Lisp_Object Qmouse_color; 105Lisp_Object Qmouse_color;
105Lisp_Object Qminibuffer; 106Lisp_Object Qminibuffer;
@@ -1329,7 +1330,7 @@ delete_frame (frame, force)
1329 struct frame *sf = SELECTED_FRAME (); 1330 struct frame *sf = SELECTED_FRAME ();
1330 struct kboard *kb; 1331 struct kboard *kb;
1331 1332
1332 int minibuffer_selected; 1333 int minibuffer_selected, tooltip_frame;
1333 1334
1334 if (EQ (frame, Qnil)) 1335 if (EQ (frame, Qnil))
1335 { 1336 {
@@ -1381,13 +1382,15 @@ delete_frame (frame, force)
1381 } 1382 }
1382 } 1383 }
1383 1384
1385 tooltip_frame = !NILP (Fframe_parameter (frame, intern ("tooltip")));
1386
1384 /* Run `delete-frame-functions' unless FORCE is `noelisp' or 1387 /* Run `delete-frame-functions' unless FORCE is `noelisp' or
1385 frame is a tooltip. FORCE is set to `noelisp' when handling 1388 frame is a tooltip. FORCE is set to `noelisp' when handling
1386 a disconnect from the terminal, so we don't dare call Lisp 1389 a disconnect from the terminal, so we don't dare call Lisp
1387 code. */ 1390 code. */
1388 if (NILP (Vrun_hooks) || !NILP (Fframe_parameter (frame, intern ("tooltip")))) 1391 if (NILP (Vrun_hooks) || tooltip_frame)
1389 ; 1392 ;
1390 if (EQ (force, Qnoelisp)) 1393 else if (EQ (force, Qnoelisp))
1391 pending_funcalls 1394 pending_funcalls
1392 = Fcons (list3 (Qrun_hook_with_args, Qdelete_frame_functions, frame), 1395 = Fcons (list3 (Qrun_hook_with_args, Qdelete_frame_functions, frame),
1393 pending_funcalls); 1396 pending_funcalls);
@@ -1633,7 +1636,8 @@ delete_frame (frame, force)
1633 } 1636 }
1634 1637
1635 /* Cause frame titles to update--necessary if we now have just one frame. */ 1638 /* Cause frame titles to update--necessary if we now have just one frame. */
1636 update_mode_lines = 1; 1639 if (!tooltip_frame)
1640 update_mode_lines = 1;
1637 1641
1638 return Qnil; 1642 return Qnil;
1639} 1643}
@@ -4451,6 +4455,8 @@ syms_of_frame ()
4451 staticpro (&Qicon_left); 4455 staticpro (&Qicon_left);
4452 Qicon_top = intern_c_string ("icon-top"); 4456 Qicon_top = intern_c_string ("icon-top");
4453 staticpro (&Qicon_top); 4457 staticpro (&Qicon_top);
4458 Qtooltip = intern_c_string ("tooltip");
4459 staticpro (&Qtooltip);
4454 Qleft = intern_c_string ("left"); 4460 Qleft = intern_c_string ("left");
4455 staticpro (&Qleft); 4461 staticpro (&Qleft);
4456 Qright = intern_c_string ("right"); 4462 Qright = intern_c_string ("right");
diff --git a/src/w32fns.c b/src/w32fns.c
index bc310da0d2f..fe03537c49b 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5584,9 +5584,8 @@ x_create_tip_frame (dpyinfo, parms, text)
5584 change_frame_size (f, height, width, 1, 0, 0); 5584 change_frame_size (f, height, width, 1, 0, 0);
5585 5585
5586 /* Add `tooltip' frame parameter's default value. */ 5586 /* Add `tooltip' frame parameter's default value. */
5587 if (NILP (Fframe_parameter (frame, intern ("tooltip")))) 5587 if (NILP (Fframe_parameter (frame, Qtooltip)))
5588 Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt), 5588 Fmodify_frame_parameters (frame, Fcons (Fcons (Qtooltip, Qt), Qnil));
5589 Qnil));
5590 5589
5591 /* Set up faces after all frame parameters are known. This call 5590 /* Set up faces after all frame parameters are known. This call
5592 also merges in face attributes specified for new frames. 5591 also merges in face attributes specified for new frames.
diff --git a/src/xfns.c b/src/xfns.c
index 6d041708eec..d06b83b5186 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -205,6 +205,8 @@ extern Lisp_Object Vwindow_system_version;
205 205
206/* The below are defined in frame.c. */ 206/* The below are defined in frame.c. */
207 207
208extern Lisp_Object Qtooltip;
209
208#if GLYPH_DEBUG 210#if GLYPH_DEBUG
209int image_cache_refcount, dpyinfo_refcount; 211int image_cache_refcount, dpyinfo_refcount;
210#endif 212#endif
@@ -4914,9 +4916,8 @@ x_create_tip_frame (dpyinfo, parms, text)
4914 change_frame_size (f, height, width, 1, 0, 0); 4916 change_frame_size (f, height, width, 1, 0, 0);
4915 4917
4916 /* Add `tooltip' frame parameter's default value. */ 4918 /* Add `tooltip' frame parameter's default value. */
4917 if (NILP (Fframe_parameter (frame, intern ("tooltip")))) 4919 if (NILP (Fframe_parameter (frame, Qtooltip)))
4918 Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt), 4920 Fmodify_frame_parameters (frame, Fcons (Fcons (Qtooltip, Qt), Qnil));
4919 Qnil));
4920 4921
4921 /* FIXME - can this be done in a similar way to normal frames? 4922 /* FIXME - can this be done in a similar way to normal frames?
4922 http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00641.html */ 4923 http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00641.html */