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 123570 - Sending multiple dock requests to the same window
Sending multiple dock requests to the same window
Status: RESOLVED FIXED
Product: libegg
Classification: Other
Component: tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Libegg maintenance
Libegg maintenance
Depends on:
Blocks:
 
 
Reported: 2003-09-30 17:03 UTC by Owen Taylor
Modified: 2006-07-28 21:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch fixing (2.96 KB, patch)
2003-09-30 19:50 UTC, Owen Taylor
none Details | Review

Description Owen Taylor 2003-09-30 17:03:53 UTC
Right now, it's quite possible for the tray icon to send
multiple dock requests to the same manager. The easiest
way for this to happen is:

 Application receives the client manager telling that a new
  tray manager has started in its event queue
 realize() calls update_manager_window()
 application processes the client message, update_manager_window()
  is called again

Handling things correctly is not hard:

 Once we've sent a dock request to a particular manager window,
 we must take no further action until *that* manager* window
 is destroyed.

This is why the ICCCM states that when an app with a manager
selection loses the manager selection, it must destroy the window.
Comment 1 Owen Taylor 2003-09-30 19:50:50 UTC
Created attachment 20391 [details] [review]
Patch fixing
Comment 2 Owen Taylor 2003-09-30 19:54:27 UTC
The attached patch should fix things so that a dock request
will only ever be sent once to the same window. As far as
I know, it is completely correct; it probably could do
with an extra comment or two.
Comment 3 Kjartan Maraas 2005-01-25 17:32:49 UTC
Was never applied. Users are: 

../../../zenity/src/eggtrayicon.c
../../../gnomemeeting/lib/eggtrayicon.c
../../../rhythmbox/widgets/eggtrayicon.c
../../../goobox/src/eggtrayicon.c
../../../muine/libmuine/egg/eggtrayicon.c
../../../gnome-jabber/src/eggtrayicon.c
../../../epiphany/lib/egg/eggtrayicon.c
../../../evolution/e-util/eggtrayicon.c
../../../gaim/plugins/docklet/eggtrayicon.c
../../../gnome-media/gnome-cd/eggtrayicon.c
../../../gwget/src/eggtrayicon.c
../../../gnome-control-center/typing-break/eggtrayicon.c
../../../straw/src/eggtray/eggtrayicon.c
../../../blam/libblam/eggtrayicon.c
../../../firestarter/src/eggtrayicon.c
../../../NetworkManager/examples/python/systray/eggtrayicon.c
../../../NetworkManager/panel-applet/eggtrayicon.c
../../../gnome-phone-manager/libegg/libegg/tray/eggtrayicon.c
../../../libegg/libegg/tray/eggtrayicon.c
../../../camorama-0.17/src/eggtrayicon.c

Just for fun:

gnomemeeting is using an old version of this file without all the current fixes.
rhythmbox has added one function that is not in the original copy
muine has copied the one from rhythmbox
gnome-jabber is using an old version
epiphany is using an older version with the same added function as rhythmbox
evolution also uses the one with the added function
gaim uses an older version
gnome-cd uses the current libegg one
gnome-control-center uses an old one in typing-break
gwget uses an old one
straw uses the one with the extra function (egg_tray_icon_new_for_xscreen()),
but also removes #include <config.h> from it?
blam has the current libegg version with some whitespace change
firestarter uses the current libegg version
NetworkManager has two different ones, one in example code and one in applet code
gnome-phone-manager has the added function
and so does camorama...

Fun!
Comment 4 Vincent Untz 2006-07-28 21:18:35 UTC
AFAICT, the patch is already committed.