After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 586756 - gdk_window_get_origin returns wrong type of coordinates
gdk_window_get_origin returns wrong type of coordinates
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: X11
2.12.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-06-23 14:22 UTC by Morten Welinder
Modified: 2017-08-24 21:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2009-06-23 14:22:53 UTC
If I understand things right, Gdk operates in 32-bit coordinates
and employs a translation scrolling-type layer to cope with X11's 16-bit
restriction.  The X11 coordinates are not supposed to be visible to the
Gdk user, possibly with the exception of the function
gdk_window_get_internal_paint_info.

But gdk_window_get_origin returns X11 coordinates.  Hence for a very
large window -- the window of a foocanvas to be exact -- the coordinates
get clipped at +/- 16k.

My workaround is to get the offset via gdk_window_get_internal_paint_info.


Caution: _gdk_windowing_window_get_pointer seems to rely on getting X11
coordinates from gdk_window_get_origin.
Comment 1 Morten Welinder 2011-10-22 00:39:06 UTC
Probably obsolete.
Comment 2 Daniel Boles 2017-08-24 21:46:21 UTC
Please do reopen if it's not!