-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add order rule for layers #7697
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also will stable sort do...?
If the priority is changed at runtime... it might misalign stuff (wrt creation time). Though that's a minor concern I think...?
The stable part means that if all layers have the same priority, nothing will happen and they stay sorted by creation time. If you change some priorities and then change them all back to 0, they won't be resorted by creation time, and will remain in whatever order they were left in. I don't think that's an issue, unless someone wants to script something where they temporary bring a layer to the top/bottom, and then want to revert it to its original position. If we want to "fix" that we'd need to track creation time or sort at every draw into a new collection. |
....or keep two lists |
Would you want that before merging this? It sounds like a very niche problem |
no, it's fine |
Needs wiki MR. I am trying to make the layerrule work with waybar and wvkbd but I am not able. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@kRHYME7 did you manage to make this work ? How please? |
Nah, I'm dumb. What this PR means is assigning the priority of layers to be closer to the edge of the monitor. I really thought that it handles the Z axis /level of a layer. |
Someone explain to make a wiki mr please. |
Describe your PR, what does it fix/add?
Adds an
order
rule for layers, like so:A higher order means the layer is closer to the edge of the monitor.
Closes #7476
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
Idk where the best place to do the sorting is, I just put it somewhere where it works.
The best sorting algorithm to use would be insertion sort as usually there will be 0 or 1 elements out of order, idk what
std::stable_sort
does.Is it ready for merging, or does it need work?
Fine to merge probably