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
View this message in rfc822 format
YAMAMOTO Mitsuharu skrev 2010-07-16 02.35:
>>>>>> On Thu, 15 Jul 2010 12:56:38 +0200, Jan Djärv<jan.h.d <at> swipnet.se> said:
>
>>> It seems to be difficult to reach agreement about absolete unscaled
>>> vs. absolute scaled. Fortunately, that doesn't matter for X11
>>> currently, and we agree with the necessity of a special function
>>> that returns absolute unscaled coordinates to pass to an external
>>> program. Why don't we start discussing the specification of that
>>> special function, letting absolute unscaled vs. absolute scaled
>>> aside for now?
>>>
>>> My proposal was to make it parallel to posn-at-x-y, as I mentioned.
>>>
>>> (posn-at-x-y x y&optional frame-or-window whole)
>>>
>
>> Sure. Please check the ifdefs in the window absolute functions I
>> made to see the various differences w.r.t tool bar and menu bar.
>
> I don't think such ifdefs are necessary. The strategy I'm thinking of
> is:
>
> 1) Convert window coordinates to frame coordinates if the third
> argument is not a frame. This should be similar to the code in
> pos-at-x-y.
AFAIK, there is no pos-at-x-y function. Did you mean posn-at-x-y?
> 2) Call a terminal-specific function that converts frame-relative
> coordinates to absolute coordinates. That can be done by the
> following "idiom".
>
> x += f->left_pos + FRAME_OUTER_TO_INNER_DIFF_X (f);
> y += f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f);
>
> on X11 and
>
> ClientToScreen (FRAME_W32_WINDOW (f),&pt)
>
> on W32, I guess.
You left out Nextstep/OSX.
>
> By the way, window-(inside-)absolute-pixel-edges doesn't seem to take
> account of title bar height. Is that correct?
Why should it? The titlebar isn't an Emacs window in X, it belongs to the
window manager. Top/left does not point at it, it points at the Emacs frame.
Jan D.
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.