-
Notifications
You must be signed in to change notification settings - Fork 597
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
[RFC] client: Rewrite the client stacking code in Lua. #3751
base: master
Are you sure you want to change the base?
Conversation
8432624
to
17f062e
Compare
fac155d
to
22a3461
Compare
Codecov Report
@@ Coverage Diff @@
## master #3751 +/- ##
==========================================
+ Coverage 90.97% 91.01% +0.04%
==========================================
Files 900 900
Lines 57500 57553 +53
==========================================
+ Hits 52309 52381 +72
+ Misses 5191 5172 -19
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
All this seems pretty good, and at first glance it works fine too. I'm sending this message from this branch right now, actually.
The only things that I'd point out other than the changes i have requested, is that spawning windows feels somewhat sluggish compared to the main branch, but I don't think that that's a dealbreaker for most people lol
for _, c in ipairs(clients) do append(c) end | ||
for i=#drawins, 1, -1 do append(drawins[i].get_wibox()) end |
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.
These two lines should be swapped, as in the original C code, drawins are rendered under clients. (plus it kinda ruins the point of ontop)
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.
Not sure about this, swapping those line breaks quite a few things. For example, the client go on top of the wibar in the "old" builds. If I swap these, the wibox goes on top. That doesn't mean it didn't break anything. It's after all not exactly what it did before. What did you witness being in the wrong order?
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.
That must've been a mistake on my end. Wiboxes do indeed go on top when these two lines are swapped. I just thought that it would be the other way around. Didn't notice line 482 inserting into the table at index 1 lol
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.
IMO client should go over wibar only if it have c.ontop == true
This adds 2 new requests: * request::raise: Helps to decouple ewmh and client class internally plus allow some focus stealing policies. * reqest::restack: Send *why* something is restacked to Lua. It allows to do things like sending a client to the back of a layout rather than use the master area. This is mostly a 1:1 port of the C code. The idea is to use this as a starting point to have a stack per `tag` rather than something global. It also paves the way for stacking wibox among clients in a predictable way. None of that is exposed in the public API as part of this commit. The point is to get enough going so the wibox desktop layer PR can be implemented on top of this.
22a3461
to
c6a9148
Compare
* \param c The client to push. | ||
* \param context An human readable reason of why this was done. |
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.
* \param context An human readable reason of why this was done. | |
* \param context A human-readable reason of why this was done. |
Though, I'd disagree that this is "human-readable". The only values for this I've seen in the PR are cryptic, single word strings like "maprequest"
.
If the context
is supposed to be human-readable, i.e. printed, it should at the very least include the full caller's function name, so that you have something to search for.
Or if context
is supposed to be compared to programmatically, it should be an enum, with each value documented.
This adds 2 new requests:
This is mostly a 1:1 port of the C code. The idea is to use this as a starting point to have a stack per
tag
rather than something global. It also paves the way for stacking wibox among clients in a predictable way. None of that is exposed in the public API as part of this commit. The point is to get enough going so the wibox desktop layer PR (#3750 ) can be implemented on top of this.