Bug 89354 - ksystraycmd patch : new features, and bugs fixes
Summary: ksystraycmd patch : new features, and bugs fixes
Status: RESOLVED FIXED
Alias: None
Product: kicker
Classification: Plasma
Component: systemtray (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Aaron J. Seigo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-12 14:25 UTC by Cédric Brégardis
Modified: 2005-07-11 19:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
new features and bug fixes for ksystraycmd (7.89 KB, patch)
2004-09-12 14:40 UTC, Cédric Brégardis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cédric Brégardis 2004-09-12 14:25:58 UTC
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.
Comment 1 Cédric Brégardis 2004-09-12 14:40:14 UTC
Created attachment 7496 [details]
new features and bug fixes for ksystraycmd
Comment 2 Aaron J. Seigo 2005-07-11 19:48:12 UTC
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