diff options
| author | Chong Yidong | 2011-11-09 22:29:23 +0800 |
|---|---|---|
| committer | Chong Yidong | 2011-11-09 22:29:23 +0800 |
| commit | 2fbdc249e6c99b886f2beb38eefabf53b5c3848c (patch) | |
| tree | c9794c579ff4ddc7d3a1841e4ff672003eb37381 /src/window.c | |
| parent | 1dce71935ccc44369ccc27094be6c5bebc3080b4 (diff) | |
| download | emacs-2fbdc249e6c99b886f2beb38eefabf53b5c3848c.tar.gz emacs-2fbdc249e6c99b886f2beb38eefabf53b5c3848c.zip | |
Disallow calling window-inside-edges and related functions on internal windows.
* src/window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
(Fwindow_inside_absolute_pixel_edges): Only allow live windows.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/window.c b/src/window.c index 00e887436d3..83a8974e88d 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -859,7 +859,7 @@ The inside edges do not include the space used by the WINDOW's scroll | |||
| 859 | bar, display margins, fringes, header line, and/or mode line. */) | 859 | bar, display margins, fringes, header line, and/or mode line. */) |
| 860 | (Lisp_Object window) | 860 | (Lisp_Object window) |
| 861 | { | 861 | { |
| 862 | register struct window *w = decode_any_window (window); | 862 | register struct window *w = decode_window (window); |
| 863 | 863 | ||
| 864 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w) | 864 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w) |
| 865 | + WINDOW_LEFT_MARGIN_COLS (w) | 865 | + WINDOW_LEFT_MARGIN_COLS (w) |
| @@ -874,9 +874,9 @@ bar, display margins, fringes, header line, and/or mode line. */) | |||
| 874 | } | 874 | } |
| 875 | 875 | ||
| 876 | DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, | 876 | DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, |
| 877 | doc: /* Return a list of the edge pixel coordinates of WINDOW. | 877 | doc: /* Return a list of the edge pixel coordinates of WINDOW's text area. |
| 878 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at | 878 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to (0,0) |
| 879 | the top left corner of the frame. | 879 | at the top left corner of the frame's window area. |
| 880 | 880 | ||
| 881 | RIGHT is one more than the rightmost x position of WINDOW's text area. | 881 | RIGHT is one more than the rightmost x position of WINDOW's text area. |
| 882 | BOTTOM is one more than the bottommost y position of WINDOW's text area. | 882 | BOTTOM is one more than the bottommost y position of WINDOW's text area. |
| @@ -884,7 +884,7 @@ The inside edges do not include the space used by WINDOW's scroll bar, | |||
| 884 | display margins, fringes, header line, and/or mode line. */) | 884 | display margins, fringes, header line, and/or mode line. */) |
| 885 | (Lisp_Object window) | 885 | (Lisp_Object window) |
| 886 | { | 886 | { |
| 887 | register struct window *w = decode_any_window (window); | 887 | register struct window *w = decode_window (window); |
| 888 | 888 | ||
| 889 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) | 889 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) |
| 890 | + WINDOW_LEFT_MARGIN_WIDTH (w) | 890 | + WINDOW_LEFT_MARGIN_WIDTH (w) |
| @@ -901,9 +901,9 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 901 | DEFUN ("window-inside-absolute-pixel-edges", | 901 | DEFUN ("window-inside-absolute-pixel-edges", |
| 902 | Fwindow_inside_absolute_pixel_edges, | 902 | Fwindow_inside_absolute_pixel_edges, |
| 903 | Swindow_inside_absolute_pixel_edges, 0, 1, 0, | 903 | Swindow_inside_absolute_pixel_edges, 0, 1, 0, |
| 904 | doc: /* Return a list of the edge pixel coordinates of WINDOW. | 904 | doc: /* Return a list of the edge pixel coordinates of WINDOW's text area. |
| 905 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at | 905 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to (0,0) |
| 906 | the top left corner of the display. | 906 | at the top left corner of the frame's window area. |
| 907 | 907 | ||
| 908 | RIGHT is one more than the rightmost x position of WINDOW's text area. | 908 | RIGHT is one more than the rightmost x position of WINDOW's text area. |
| 909 | BOTTOM is one more than the bottommost y position of WINDOW's text area. | 909 | BOTTOM is one more than the bottommost y position of WINDOW's text area. |
| @@ -911,7 +911,7 @@ The inside edges do not include the space used by WINDOW's scroll bar, | |||
| 911 | display margins, fringes, header line, and/or mode line. */) | 911 | display margins, fringes, header line, and/or mode line. */) |
| 912 | (Lisp_Object window) | 912 | (Lisp_Object window) |
| 913 | { | 913 | { |
| 914 | register struct window *w = decode_any_window (window); | 914 | register struct window *w = decode_window (window); |
| 915 | int add_x, add_y; | 915 | int add_x, add_y; |
| 916 | calc_absolute_offset (w, &add_x, &add_y); | 916 | calc_absolute_offset (w, &add_x, &add_y); |
| 917 | 917 | ||