dannym wrote:
Hi,
[...]
hmm, just to get you a head start:
Most of the properties mentioned in the standard are those of a normal
window, so you should just start with a normal window (TForm...) and
work your way from there... (_NET_WM_NAME, WM_CLASS and _NET_WM_ICON are
normal window stuff, so no need to mess with them manually).
what you still need to do:
- request the owner of the selection "_NET_SYSTEM_TRAY_Sn" (where n =
screen number)
- if none is found, wait for a MANAGER client message (or fail horribly
if your app absolutely needs the trayicon - which would be a flaw ;) -
or just show no trayicon and continue normally)
- if one was found, send SYSTEM_TRAY_REQUEST_DOCK to it, giving it your
tray icon window
- maybe watch on _NET_SYSTEM_TRAY_ORIENTATION changes
- maybe watch on if the tray goes away in order to use some other means
instead of the trayicon then
you can look at some juicy C code that does the same here for ideas:
(don't worry, it only looks so convoluted because of 1) C and 2) Xlib)
http://svn.xfce.org/svn/xfce/libxfcegui4/trunk/libxfcegui4/netk-trayicon.c
especially:
netk_tray_icon_realize
netk_tray_icon_filter
netk_tray_icon_update
netk_tray_icon_opcode
netk_tray_icon_set_screen
Note that you should search for the counterparts in lazarus, I'm sure
most X functions already have wrappers to make them suck less (others
can comment on that?), so use/copy them instead of having to program
using Xlib directly... (where possible)
When in doubt, grep -R :)
cheers,
Danny
This link might be helpful as well ;)
http://cvs.sourceforge.net/viewcvs.py/lazarus-ccr/gtktrayicon/
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives