[kwin] [Bug 409889] Staking order is not accessible in KWin scripts

2022-03-23 Thread Natalie Clarius
https://bugs.kde.org/show_bug.cgi?id=409889

--- Comment #5 from Natalie Clarius  ---
I don't know if this has been recently implemented or always been there and
just never documented, but it works for me:

> client.stackingOrder

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 409889] Staking order is not accessible in KWin scripts

2022-01-31 Thread Natalie Clarius
https://bugs.kde.org/show_bug.cgi?id=409889

Natalie Clarius  changed:

   What|Removed |Added

 CC||natalie_clar...@yahoo.de

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 409889] Staking order is not accessible in KWin scripts

2019-07-17 Thread Mikhail Skorzhinskii
https://bugs.kde.org/show_bug.cgi?id=409889

Mikhail Skorzhinskii  changed:

   What|Removed |Added

   Assignee|kwin-bugs-n...@kde.org  |ra...@eml.cc
 Ever confirmed|0   |1
 Status|REPORTED|ASSIGNED

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 409889] Staking order is not accessible in KWin scripts

2019-07-17 Thread Martin Flöser
https://bugs.kde.org/show_bug.cgi?id=409889

--- Comment #4 from Martin Flöser  ---
Please be aware that stacking order would be read only. To manipulate you would
have to use the existing API calls.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 409889] Staking order is not accessible in KWin scripts

2019-07-17 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=409889

Nate Graham  changed:

   What|Removed |Added

 CC||n...@kde.org

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 409889] Staking order is not accessible in KWin scripts

2019-07-17 Thread Vlad Zahorodnii
https://bugs.kde.org/show_bug.cgi?id=409889

--- Comment #3 from Vlad Zahorodnii  ---
(In reply to Mikhail Skorzhinskii from comment #2)
> Any ETA on implementing this?
That's up to you.

> The task looks doable for me from my unprepared eye, so given the
> information you just shared, I guess I can prepare a patch after the
> weekends.
Great!

If that's your first contribution, then here are some useful resources to learn
how to setup a dev environment and how to submit the patch
* https://community.kde.org/Infrastructure/Phabricator
* https://community.kde.org/Get_Involved/development

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 409889] Staking order is not accessible in KWin scripts

2019-07-17 Thread Mikhail Skorzhinskii
https://bugs.kde.org/show_bug.cgi?id=409889

--- Comment #2 from Mikhail Skorzhinskii  ---
> I guess we could add something like this to the scripting API

Great! I have fears that there are some fundamental problems that prevents
exposing these structures to the scripting API.

> though I'm not sure about declarative script API, perhaps we need to expose 
> stackingOrder property.

I guess it will be the same as already existing cleints property. As long as
this is not a read-write property, it should be relativly simple to do.

> Given that Deleted is an implementation detail of kwin, we must filter out 
> such toplevels.

Agreed. Anyway, I see no reason why scripting API should have access to this
'Deleted' lists.


Any ETA on implementing this?

The task looks doable for me from my unprepared eye, so given the information
you just shared, I guess I can prepare a patch after the weekends.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 409889] Staking order is not accessible in KWin scripts

2019-07-17 Thread Vlad Zahorodnii
https://bugs.kde.org/show_bug.cgi?id=409889

--- Comment #1 from Vlad Zahorodnii  ---
> m_allClients) from workspace.h, which is not sorted at all
We don't maintain stacking order in m_allClients.

There are currently several stacking orders:
* Unconstrained (unconstrained_stacking_order): the first client in the list is
the bottom-most client, and the last client in the list is the top-most client.
Only managed clients are in tjhe list;
* Constrained (stacking_order): it's the same as the unconstrained stacking
order. The only difference between two is that in this list "below-above"
constraints are evaluated;
* Render (x_stacking): This is concatenation of the constrained stacking order
and a list of unmanaged/internal clients. Keep in mind that we use X's stacking
order only for unmanaged clients.

I guess we could add something like this to the scripting API

// We use QtScriptEngine so no ECMAScript 6 features.
var clients = workspace.stackingOrder();

workspace.stackingOrderChanged.connect(function () {
console.log('Yo!');
});

though I'm not sure about declarative script API, perhaps we need to expose
stackingOrder property.

Given that Deleted is an implementation detail of kwin, we must filter out such
toplevels.

-- 
You are receiving this mail because:
You are watching all bug changes.