![](https://seccdn.libravatar.org/avatar/fe87113ced5f370d038b90a43fd1fe1f.jpg?s=120&d=mm&r=g)
On Monday 04 April 2011 12:01:48 you wrote:
A python application that should display its icon in system tray, shows its icon randomly on screen instead and has a button on taskbar. How should I modify the script to make it show in tray?
It's probably not the script's fault, directly. I would assume it might have something to do with how GTK is interacting with plasma-desktop (incorrectly).
If you broke GTK, without fixing that, you'd need to port it to PyQT, which would be no simple feat--however, that does sound somewhat intriguing, and if the GUI isn't that complicated, I might attempt to help you with it. Source?
The relevant part is as follows: class data(c.Union): _fields_ = [("b", c.c_char * 20), ("s", c.c_short * 10), ("l", c.c_long * 5)] class XClientMessageEvent(c.Structure): _fields_ = [("type", c.c_int), ("serial", c.c_ulong), ("send_event", c.c_int), ("display", c.c_void_p), ("window", c.c_int), ("message_type", c.c_int), ("format", c.c_int), ("data", data)] (...) k = data() k.l = (0, # CurrentTime 0, # REQUEST_DOCK self.winId(), # window ID 0, # empty 0) # empty ev = XClientMessageEvent(33, #type: ClientMessage 0, # serial 0, # send_event dpy, # display managerWin, # systray manager XInternAtom(dpy, "_NET_SYSTEM_TRAY_OPCODE", 0), 32, k) I receive the following error: X Error: BadValue (integer parameter out of range for operation) 2 Major opcode: 25 Minor opcode: 0 Resource id: 0x0 Seems that the script somehow transfers 25 instead of 0 in the second field of k.l. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org