gtk.gdk.Window.get_origin() returns 3 values instead of the documented 2-tuple
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gtk+3.0 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When calling gtk.gdk.
Here is a simple way to reproduce.
1. Open a new window such as gedit.
2. Get the xid (Window id) for the window using a tool such as xwininfo.
3. Start a python shell.
4. Then in the python shell, enter this:
>>> from gi.repository import Gdk, GdkX11
>>> GdkX11.
You will observe the output has 3 values looking something like this: (1, 66, 262)
I'm not sure what the first value is, but the second and third represent the x and y origin of the window.
If you write "gtk.gdk. Window. get_origin( )" then that is indeed pygtk, not GI. But as pygtk has been deprecated long ago, and your actual example uses GI (and gedit got ported to GI long ago as well), I take it you are using GTK through introspection.
The function is behaving as documented: https:/ /developer. gnome.org/ gdk/unstable/ gdk-Windows. html#gdk- window- get-origin
I. e. it is supposed to return a 3-tuple (return value, x, y). The return value (i. e. the first part of the tuple) can be ignored as the documentation mentions.