Le Fri, 25 Nov 2011 09:18:52 +0000,
Thomas Adam <tho...@fvwm.org> a écrit :

> On Fri, Nov 25, 2011 at 12:47:06AM -0600, David Fries wrote:
> > Sending a SIGTERM to FvwmButtons works to gracefully unswallow a
> > program called stalonetray which is a system tray.  Setting
> > -transient on the FvwmButtons panel is calling XDestroyWindow and
> > in term causes the programs with items in the system tray to crash
> > with a bad window error.  I'm removing the XDestroyWindow call and
> > letting all transient
> 
> Well, I suppose what's happening here is that if an application has
> registered with a systray which is then killed, then it's probably
> defined behaviour that those programs will die along with it,
> although that to me seems buggy behaviour.

It is a buggy behaviour. Such an app must wait for another systray app
to show up. As example of good behaviour, qjackctl and claws-mail work
that way. You can kill stalonetray and restart the systray with trayer
(or the contrary), and their icons will show up into the new systray.

Into fvwm-crystal, I have:

Test (EnvMatch NotificationAreaManager stalonetray) Test (!EnvMatch
trayer_width 0) *FvwmButtons-BottomNotifAera: (1x1, \
 Swallow (Close, Respawn, FvwmModule) "FvwmStalonePanel" TrayerPanel)
 
Test (EnvMatch NotificationAreaManager trayer) Test (!EnvMatch
 trayer_width 0) *FvwmButtons-BottomNotifAera: (1x1, \
 Swallow (Close, Respawn, FvwmModule) "trayer" TrayerPanel)

Module FvwmButtons FvwmButtons-BottomNotifAera

###
For stalonetray:

DestroyFunc TrayerPanel
AddToFunc TrayerPanel
+ I DestroyModuleConfig FvwmStalonePanel: *
...
+ I *FvwmStalonePanel: (1x1, Padding 0 0, Swallow (NoClose)
  "stalonetray" 'Exec stalonetray \
...
+ I Module FvwmButtons -g
  $[trayer_area_width]x$[trayer_area_heigth]$[trayer_x]$[trayer_y]
  FvwmStalonePanel

AddToFunc ExitFunction I Exec exec killall stalonetray

###
For trayer

DestroyFunc TrayerPanel
AddToFunc TrayerPanel
+ I Exec exec trayer \
...

AddToFunc ExitFunction I Exec exec killall trayer

###
Both stalonetray and trayer will be killed and restarted during a
restart. And it work fine with compliant applications.

It is some freedesktop specifications here:
http://www.freedesktop.org/wiki/Specifications/systemtray-spec
It say nothing about a restart. But from

"An application wishing to provide an icon to the system tray should
first locate the system tray by requesting the owner window of the
manager selection. If the manager selection has no owner, clients may
use the method described in the ICCCM (watching for a MANAGER client
message) to be notified when a system tray appears."

we can extrapolate that an application that fail to locate a systray
should not crash... but be waiting to be notified when a system tray
appears.

Dominique

-- 
"We have the heroes we deserve."

Reply via email to