GNU bug report logs -
#5721
Feature request: Function that returns absolute coordinates
Previous Next
Reported by: irieshinsuke <at> yahoo.co.jp
Date: Mon, 15 Mar 2010 14:34:02 UTC
Severity: wishlist
Done: Jan Djärv <jan.h.d <at> swipnet.se>
Bug is archived. No further changes may be made.
Full log
Message #201 received at 5721 <at> debbugs.gnu.org (full text, mbox):
I may be badly confused, but here is how I understand this. We have two
Windows (which may be the same, depending on tool-kit) FRAME_X_WINDOW I
and FRAME_OUTER_WINDOW O . Both display some widget and I is a child of
O. The fn x_real_positions (usually) takes O and traverses the tree up
to the last Window before the root window.
+------
| Root window
+----
| T : The WM TOP window
| +----
| | X: Some other WM window, border, title, whatever
| +------
| | O : FRAME_OUTER_WINDOW
| +--------
| | I : FRAME_X_WINDOW
Then it computes I - T as [xy]_pixels_diff and it doesn't matter what
the WM displays in T or X or if these windows even exist.
I suppose with GTK the Window I represents the innermost text widget,
i.e the Emacs frame-root-window. That would explain, why
[xy]_pixels_diff already seem to contain internal-border-width, the
toolbar (left + top), menu-bar etc.
From this there are two questions: a) Does
T = (frame->top_left, frame->top_pos)
always hold, and b) what does I stand for (e.g. is the menu-bar included
or not etc.) ? If a) is true and b) can be known, as well as the
differences to the edit area (which seem to be zero for GTK), we are
good.
Maybe a different approach would be to receive X11 events for Window I
and go from there ?
martin rudalics <rudalics <at> gmx.at> writes:
> How to you establish that a value is "correct"?
I display a tool-tip at the position of window-absolute-pixel-edges and
look whether it displays at the right place, while changing the
variables (internal-border-width, etc.).
-ap
This bug report was last modified 11 years and 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.