Bug 199740 - gtk_status_icon_get_geometry returns bogus data
gtk_status_icon_get_geometry returns bogus data
Product: Fedora
Classification: Fedora
Component: gtk2 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matthias Clasen
Depends On:
  Show dependency treegraph
Reported: 2006-07-21 13:57 EDT by John Dennis
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-27 14:55:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description John Dennis 2006-07-21 13:57:51 EDT
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 14:12:29 EDT
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 14:55:27 EDT
Moved upstream, where I track GTK+ bugs:


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