feat(i3wm): rounded corners#5686
Conversation
9dba75a to
6e737d9
Compare
orestisfl
left a comment
There was a problem hiding this comment.
Test failures need to be investigated and we would preferably need new tests
6e737d9 to
77f5340
Compare
|
For some reason, I am completely unable to locally run the test-suite; so I must use CI to assist. I will solve as many test-case failures as I can. |
77f5340 to
1715a5a
Compare
|
I got the tests all working locally, so hopefully all is well now. I could use ideas on a test-case to write for this... I am not sure how to check for a graphical change, with the existing test-suite.w |
87aeca2 to
f5bca9c
Compare
ec45e3e to
eec2b96
Compare
|
QA test fail; but when commenting out a region within |
| xcb_colormap_t colormap; | ||
|
|
||
| /* Border radius specified in pixel units */ | ||
| uint32_t border_radius; |
There was a problem hiding this comment.
If we are already saving this in the container, I would add a corresponding command as well to change the radius, for consistency with the border directive/command
There was a problem hiding this comment.
If we don't want a command, then I wouldn't save it in the Con level at all, since it means that the setting is not updated when changing and reloading configuration.
There was a problem hiding this comment.
@orestisfl I have pushed a new patchset that includes a command, exports into JSON tree, and has a small unit-test to ensure values did pass around correctly.
|
Hi @orestisfl ! With regards to the single pixel border: I think both items are handled completely different, and incompatibly so. The corner radius modification is accomplished by means of a mask applied to the viewing window. This means the code that draws this border would also need to drawing arcs on the corners of containers/windows... Thoughts, comments, suggestions are welcomed! |
|
Okay, so the option is practically incompatible with window borders? That seems like a serious limitation. |
|
I'm not familiar with i3wm code, but I'm good at C. If you need my assistance, please ping me and I will try to help 😌 |
eec2b96 to
ac9e6d6
Compare
I already asked that some time ago and didn't get an answer: #5410 (comment) |
|
This is not possible using the API's available from X11. An OpenGL-style mask is simply applied to the viewable region. But if a requirement, then all border graphics must be drawn in software. |
d56aca5 to
f028e4d
Compare
|
I'll need to invest more time to understand the underlying issue but I'll say as a general statement that I will not merge something that is incompatible with a very basic feature of i3. We have made very explicit that we focus on bug-fixing instead of new features (#5410 (comment)) and commiting something that is already not working bug-free goes against that.
Do you mean that the mask cannot be applied to border + window at the same time?
What exactly do you mean here? |
|
Hi @orestisfl ! You might be right about not accepting new features! The current implementation uses features of X11 to "cookie-cut" the windows rounded. It easy to do (with xcb) and hardware assisted. However; borders are NOT possible with it. It is VERY stable patch, though!!! I've used it for some time now, happily and w/o a border applied. :) I wrote a quick new drawing code for rounded rectangle; but cannot figure out how to apply it above the incoming frames from the application drawing. Thoughts, comments, suggestions are welcomed! |
|
@orestisfl what's the state of this now? will this be merged? |
I think this is currently blocked because of #5686 (review) |
|
Ah, I see, thanks for the update.
@jbenden do you need my help with that? I don't know the i3 code at all, but when 4 eyes are looking at the problem, we may figure something out. |
7a62436 to
2cd81ed
Compare
Signed-off-by: Joseph Benden <joe@benden.us>
2cd81ed to
dcbdc6d
Compare
|
Sorry if this is off-topic, but rounded borders can be achieved at compositor level by sampling the original border and adding fillets in the window corners. I've implemented a proof-of-concept
|
|
@Jacajack Thank's for sharing :) There are several forks of compton/picom that do this already; the idea behind doing it in i3 was to not rely on a compositor. |
The whole point of this is to get i3's border to be rounded without the need of a compositor, since most compositor I've used cause quite a lot of issue with gaming. |





Revives patch set to implement rounded corners!
This should be the minimum needed; whereas, previous PRs included miscellaneous changes related to other repo/sites.
See: #5410
See: #5429