[sawfish: 3/9] Doc bugfix of window-absolute-position.
- From: Christopher Bratusek <chrisb src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [sawfish: 3/9] Doc bugfix of window-absolute-position.
- Date: Sat, 21 Nov 2009 09:47:04 +0000 (UTC)
commit 1dc203402b17669a6b68d587ad1c7b1888937a48
Author: Teika kazura <teika lavabit com>
Date: Tue Nov 17 16:59:36 2009 +0900
Doc bugfix of window-absolute-position.
lisp/sawfish/wm/viewport.jl | 7 +++++--
man/sawfish.texi | 5 ++---
2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/lisp/sawfish/wm/viewport.jl b/lisp/sawfish/wm/viewport.jl
index f2341c6..af7e15c 100644
--- a/lisp/sawfish/wm/viewport.jl
+++ b/lisp/sawfish/wm/viewport.jl
@@ -489,8 +489,11 @@ to the viewport it occupies."
(- (cdr coords) (cdr offset)))))
(define (window-absolute-position w)
- "Returns a cons cell with the coordinates of the window relative
-to the viewport 0,0."
+ "Returns the coordinates of the window as if the window's viewport
+is selected. The return value is the cons cell (x . y)."
+ ;; So, ignoring the side effect, it's roughly equal to
+ ;; (set-screen-viewport (window-viewport w))
+ ;; (window-position w)
(let ((position (window-position w)))
(if (window-outside-viewport-p w)
(cons (mod (+ (car position) viewport-x-offset) (screen-width))
diff --git a/man/sawfish.texi b/man/sawfish.texi
index e3e4909..9ac071e 100644
--- a/man/sawfish.texi
+++ b/man/sawfish.texi
@@ -4153,9 +4153,8 @@ that viewport rather than the current one.
@end defun
@defun window-absolute-position window
-Returns a cons cell @code{(@var{x} . @var{y})} of the position of
- var{window} in its containing viewport. The containing viewport may
-or may not be the current viewport.
+Returns the coordinates of the window as if the window's viewport
+is selected. The return value is the cons cell (x . y).
@end defun
@defun set-window-viewport window col row
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]