aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2012-08-07 15:02:04 +0800
committerChong Yidong2012-08-07 15:02:04 +0800
commitd10a51dcdfab2d9283bd2e3229330c511d5af193 (patch)
treeac283584008d8eba23830ac40efcee76c25ffc66 /src
parent1ff8a4e98cd0c858a142b35a62b452a36449d259 (diff)
downloademacs-d10a51dcdfab2d9283bd2e3229330c511d5af193.tar.gz
emacs-d10a51dcdfab2d9283bd2e3229330c511d5af193.zip
Check for live frames explicitly in window.c functions which need it.
* window.c (Fwindow_edges, Fwindow_pixel_edges) (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal) (Fdelete_window_internal): Signal an error if the window is not on a live frame. Fixes: debbugs:12025
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/window.c10
2 files changed, 15 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2dcfd9ccd64..727e3ca9819 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12012-08-07 Chong Yidong <cyd@gnu.org>
2
3 * window.c (Fwindow_edges, Fwindow_pixel_edges)
4 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
5 (Fdelete_window_internal): Signal an error if the window is not on
6 a live frame (Bug#12025).
7
12012-08-07 Dmitry Antipov <dmantipov@yandex.ru> 82012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2 9
3 Drop FGET and revert read access to Lisp_Objects slots of struct frame. 10 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
diff --git a/src/window.c b/src/window.c
index 912eb04f489..866f4d34a76 100644
--- a/src/window.c
+++ b/src/window.c
@@ -151,8 +151,6 @@ decode_any_window (register Lisp_Object window)
151 151
152 CHECK_WINDOW (window); 152 CHECK_WINDOW (window);
153 w = XWINDOW (window); 153 w = XWINDOW (window);
154 /* The following test throws up every time a tooltip frame is displayed. */
155 /* CHECK_LIVE_FRAME (w->frame); */
156 return w; 154 return w;
157} 155}
158 156
@@ -746,6 +744,7 @@ just the text area, use `window-inside-edges'. */)
746 (Lisp_Object window) 744 (Lisp_Object window)
747{ 745{
748 register struct window *w = decode_any_window (window); 746 register struct window *w = decode_any_window (window);
747 CHECK_LIVE_FRAME (WGET (w, frame));
749 748
750 return Fcons (make_number (WINDOW_LEFT_EDGE_COL (w)), 749 return Fcons (make_number (WINDOW_LEFT_EDGE_COL (w)),
751 Fcons (make_number (WINDOW_TOP_EDGE_LINE (w)), 750 Fcons (make_number (WINDOW_TOP_EDGE_LINE (w)),
@@ -767,6 +766,7 @@ of just the text area, use `window-inside-pixel-edges'. */)
767 (Lisp_Object window) 766 (Lisp_Object window)
768{ 767{
769 register struct window *w = decode_any_window (window); 768 register struct window *w = decode_any_window (window);
769 CHECK_LIVE_FRAME (WGET (w, frame));
770 770
771 return Fcons (make_number (WINDOW_LEFT_EDGE_X (w)), 771 return Fcons (make_number (WINDOW_LEFT_EDGE_X (w)),
772 Fcons (make_number (WINDOW_TOP_EDGE_Y (w)), 772 Fcons (make_number (WINDOW_TOP_EDGE_Y (w)),
@@ -812,6 +812,8 @@ of just the text area, use `window-inside-absolute-pixel-edges'. */)
812{ 812{
813 register struct window *w = decode_any_window (window); 813 register struct window *w = decode_any_window (window);
814 int add_x, add_y; 814 int add_x, add_y;
815
816 CHECK_LIVE_FRAME (WGET (w, frame));
815 calc_absolute_offset (w, &add_x, &add_y); 817 calc_absolute_offset (w, &add_x, &add_y);
816 818
817 return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x), 819 return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x),
@@ -2580,6 +2582,7 @@ window-start value is reasonable when this function is called. */)
2580 int top IF_LINT (= 0), new_top, resize_failed; 2582 int top IF_LINT (= 0), new_top, resize_failed;
2581 2583
2582 w = decode_any_window (window); 2584 w = decode_any_window (window);
2585 CHECK_LIVE_FRAME (WGET (w, frame));
2583 XSETWINDOW (window, w); 2586 XSETWINDOW (window, w);
2584 f = XFRAME (WGET (w, frame)); 2587 f = XFRAME (WGET (w, frame));
2585 2588
@@ -2593,6 +2596,7 @@ window-start value is reasonable when this function is called. */)
2593 /* ROOT must be an ancestor of WINDOW. */ 2596 /* ROOT must be an ancestor of WINDOW. */
2594 { 2597 {
2595 r = decode_any_window (root); 2598 r = decode_any_window (root);
2599 CHECK_LIVE_FRAME (WGET (r, frame));
2596 pwindow = WGET (XWINDOW (window), parent); 2600 pwindow = WGET (XWINDOW (window), parent);
2597 while (!NILP (pwindow)) 2601 while (!NILP (pwindow))
2598 if (EQ (pwindow, root)) 2602 if (EQ (pwindow, root))
@@ -3837,6 +3841,8 @@ Signal an error when WINDOW is the only window on its frame. */)
3837 int before_sibling = 0; 3841 int before_sibling = 0;
3838 3842
3839 w = decode_any_window (window); 3843 w = decode_any_window (window);
3844 CHECK_LIVE_FRAME (WGET (w, frame));
3845
3840 XSETWINDOW (window, w); 3846 XSETWINDOW (window, w);
3841 if (NILP (WGET (w, buffer)) 3847 if (NILP (WGET (w, buffer))
3842 && NILP (WGET (w, hchild)) && NILP (WGET (w, vchild))) 3848 && NILP (WGET (w, hchild)) && NILP (WGET (w, vchild)))