Bug 199740 - gtk_status_icon_get_geometry returns bogus data
Summary: gtk_status_icon_get_geometry returns bogus data
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk2
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-21 17:57 UTC by John Dennis
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-07-27 18:55:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
test case in python (2.96 KB, application/octet-stream)
2006-07-21 18:12 UTC, John Dennis
no flags Details

Description John Dennis 2006-07-21 17:57:51 UTC
gtk_status_icon_get_geometry often returns bogus data, at least as observed via
use by the python bindings. Various tests and conversations with Ray Strode and
Matthias suggest the problem arises because the geometry information is fully
known until the moment the icon is rendered into the notification area. However,
this is no signal emitted for this event making it difficult to know when one
the information is valid. The position information is needed to properly attach
a notification bubble to the icon.

Also, should the icon move because either the set of visible status icons
change, or because panel, or the notification area in the panel changes, there
is no way to properly update the positioning.

Perhaps providing a signal for when positioning changes (first display, any
subseqent move, etc.) would help address the problem in a generic manner.

The function does return a boolean if the returned information is valid but this
is not terribly useful because of the timing issues, this appears to be
compounded by the fact the python binding always return a tuple, at least
acording to the doc and observation, I didn't check the binding code.

After much fussing the only viable workaround I've come up with is to schedule a
timer callback for a short duration in the future after displaying the status
icon and querying the geometry then with the hope its valid at that moment the
timer fires. Attempts at adding an idle callback after displaying the icon to
perform geometry query were not reliable.

Comment 1 John Dennis 2006-07-21 18:12:29 UTC
Created attachment 132830 [details]
test case in python

test case, no args, position immediately, -i = get geometry in idle loop, -t
schedule timer event

Comment 2 Matthias Clasen 2006-07-27 18:55:27 UTC
Moved upstream, where I track GTK+ bugs:

http://bugzilla.gnome.org/show_bug.cgi?id=348971


Note You need to log in before you can comment on or make changes to this bug.