Registered Member
|
Hi,
I'm wonder if there is a signal emitted when client is shaded. I couldn't find it here: http://techbase.kde.org/Development/Tut ... ng/API_4.9 Can I ask for any insight? |
KDE Developer
|
tried shadeChanged() in the Client class?
|
Registered Member
|
Yes. But I thought that there is a way to do something like: shaded.connect(function(client) { and unshaded.connect(function(client) {
I feel a little ashamed but although scripting is easy I can't make my script work with shadeChanged(). |
KDE Developer
|
what do you want to achieve in the script? I probably can help
|
Registered Member
|
nothing big (as usual). All I want is to remove shaded windows from taskbar. I think I can make it work if I can get this signal right.
|
KDE Developer
|
ah that is not very difficult to achieve.
You need to track all windows, that is connect to whenever a window gets added. There you connect to the shadeChanged signal. That gets fired whenever the window gets shaded/unshaded. If the new state (you can query that through a client property) is shaded you set the skipTaskbar property, if it gets unshaded you remove the property again. |
Registered Member
|
Hi,
I don't want to bother you with silly quetions but if I want to set bool to true i just = true it like client.keepAbove = true; I ask because for some reason my "homework": workspace.clientMinimized(function(client) { if (client.shade) { client.keepAbove = true; } }); does not want to work. I made it to learn how to set booleans in kwin scripts. I want to finally be able to do something on my own |
KDE Developer
|
The code in itself looks fine, but it might be that this doesn't make sense from a semantic point of view. You set a shaded client to keep above other windows when it gets minimized. No surprise that you don't see it
|
Registered Member
|
I know. This script is not intend to do anything uesful.
But it really does not work. I can't see in the taskbar menu that it's setted to keep above. Also I thought that this will set keep above but won't unset it. |
KDE Developer
|
I did not look into the code, but it's possible that this is sementically not possible at that point. That is KWin just discards the request. Do something that makes sense to test |
Registered Member
|
workspace.clientSetKeepAbove(function(client) {
if (client.shade) { client.skipTaskbar = true; } }); ok this one has more sense Skip the tasbkar if shaded window is getting always on top. Still does not work. KDE 4.9.2. |
KDE Developer
|
you are missing a .connect
|
Registered Member
|
uh, right
workspace.clientSetKeepAbove.connect(function(client) { if (client.shade) { client.skipTaskbar = true; } }); Still does not work. For some reason. I tried: workspace.clientSetKeepAbove.connect(function(client) { if (client.onAllDesktops) { client.skipTaskbar = true; } }); and this also does not work. I'm confused. What I'm doing wrong? |
|
"Does not work" means the taskbar still shows it?
What's does xprop say about that client and taskbars? |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft