[PATCH] systray icon
Jehan Bing
jehan@bravobrava.com
Sun Jun 23 17:18:00 GMT 2002
Hello everybody,
Here is another patch which adds the "-systray" option. With this option
on, instead of adding buttons to the taskbar, it adds icons to the
notification area (a.k.a. systray).
To work, there must be a "X.ico" (see attachment) in the same directory
than XWin.exe
Left click on the icon shows the window if it was hidden, hide it otherwise.
Right click displays the system menu (there isn't one in fullscreen)
Notes:
- I added a file (winsystray.c) so "make depend" is in order.
- The patch also changes the title to include the screen number. To
get the screen number, I'm searching the g_ScreenInfo array. I'm sure
there must be a better way to get this number (search for "HACK", there
are 3 places).
- The option doesn't work well in fullscreen mode. For some reason,
when one click on the systray icon, the application isn't activated
(doesn't switch to fullscreen, no WM_ACTIVATEAPP received) but the
application still captures the mouse event, it's as if the desktop
doesn't respond anymore. For those who try and/or want to fix it (I
don't have the beginning of an idea for that so help is welcome), to
recover from the "freeze", open the start menu with the "Windows" key,
then click outside the menu.
- I fixed a couple typos (CYGDEGUG and missing '\n' for
"-lesspointer" usage)
- X.ico would be better off added as a resource to the application
instead of an external file (or both if we want to allow customization).
Can we do that with cygwin?
- An improvment would be to add the screen number to the icon
itself. It would be better than waiting for the tooltip.
- I would like to change the left click behavior. I want it to put
the window to the foreground if it was not (hidden behind another
window), hide it otherwise. However, when one click on the systray, the
systray become the foreground window. Does someone know how to get the
handle of the previous foreground window?
Jehan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: systray.patch
URL: <http://cygwin.com/pipermail/cygwin-xfree/attachments/20020623/6a8977b6/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: X.ico
Type: image/x-icon
Size: 4710 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-xfree/attachments/20020623/6a8977b6/attachment.bin>
More information about the Cygwin-xfree
mailing list