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
[Message part 1 (text/plain, inline)]
Hi,
I made another patch, see below. I build it with GTK and X-tool-kit and
tested it on Xmonad, fluxbox and compiz, also on Windows 7. In all
cases `window-inside-absolute-pixel-edges' seems to report the correct
x-y values, i.e. the absolute position of the beginning of the text
area.
[window-absolute-pixel.diff (text/x-diff, inline)]
=== modified file 'src/window.c'
*** src/window.c 2013-10-02 12:08:27 +0000
--- src/window.c 2013-10-03 17:06:53 +0000
***************
*** 940,945 ****
--- 940,950 ----
{
struct frame *f = XFRAME (w->frame);
*add_y = f->top_pos;
+ #ifdef HAVE_X_WINDOWS
+ *add_y += FRAME_X_OUTPUT (f)->y_pixels_outer_diff;
+ #elif defined (WINDOWSNT)
+ *add_y += f->y_pixels_diff;
+ #endif
#ifdef FRAME_MENUBAR_HEIGHT
*add_y += FRAME_MENUBAR_HEIGHT (f);
#endif
***************
*** 951,957 ****
--- 956,968 ----
#ifdef FRAME_NS_TITLEBAR_HEIGHT
*add_y += FRAME_NS_TITLEBAR_HEIGHT (f);
#endif
+
*add_x = f->left_pos;
+ #ifdef HAVE_X_WINDOWS
+ *add_x += FRAME_X_OUTPUT (f)->x_pixels_outer_diff;
+ #elif defined (WINDOWSNT)
+ *add_x += f->x_pixels_diff;
+ #endif
#ifdef FRAME_TOOLBAR_LEFT_WIDTH
*add_x += FRAME_TOOLBAR_LEFT_WIDTH (f);
#endif
[Message part 3 (text/plain, inline)]
-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.