Version: (using KDE KDE 3.3.0) Installed from: Compiled From Sources Compiler: gcc 3.3.4 OS: Linux Here is a patch for ksystraycmd. It adds features, and corrects some bugs : 1) I have added a new option (--ownicon) to have the ksystraycmd icon in the systray instead of the icon of the target window. It can be useful if the window's icon is ugly and can't be changed with the classical kde option (eg : gkrellm which is a gtk application and don't know the --icon option). This option should be use with the standard "--icon" kde option to specify the ksystraycmd icon. Example: ksystraycmd --icon /home/cedric/gkrellm.png --ownicon /usr/bin/gkrellm2 2) I have added the option --ontop which put the window always on top. Example: ksystraycmd --ontop /usr/bin/gkrellm2 3) Now the position of the window is memorized when the window is hidden and restored when the window is shown. I add XMoveWindow( qt_xdisplay(), win,left, top) just after XMapWindow( qt_xdisplay(), win ) The window is drawn and moved AFTER, so there is a little visual effect. But it is really important I think to memorized the position. 4) When the window is hidden and we ask to "quit" in the contextual menu, it doesn't work, because the "closeWindowRequest" must be sent to a window, and there is no window (since it is hidden !). So I restore the window with XMapWindow( qt_xdisplay(), win ) just before the "closeWindowRequest", and it works. 5) The contextual menu now show "Restore" and "Hide" correctly (I hope). There were problems with --startonshow and --quitonhide. 6) Now, if the options --startonshow and --hidden are used together then when we activate the window by clicking on the systray or by choosing "restore" in the menu, the window is shown. The "--hidden" option prevented this, and i think it doesn't make sense (since with the --startonshow the window is already hidden in the beggining). 7) The option --quitonhide now works with the contextual menu and not only with the mouse click. Cédric.
Created attachment 7496 [details] new features and bug fixes for ksystraycmd
SVN commit 433748 by aseigo: patch to add --ownicon, --ontop and fix a few odd bugs patch courtesy of Cédric Brégardis BUG:89354 M +76 -13 ksystraycmd.cpp M +11 -2 ksystraycmd.h M +11 -0 main.cpp