resloved / i3

🔲 — Rounded i3-gaps
Other
278 stars 29 forks source link

Issue outlining rounded edges #5

Open SamOphis opened 4 years ago

SamOphis commented 4 years ago

I'm submitting a…

[ ] Bug
[ ] Feature Request
[ ] Documentation Request
[x] Other (Please describe in detail)

I'm unsure whether this is a bug or simply a missing feature,
which is why I have ticked Other, and why I have not specified a log file.

Current Behavior

Setting a border pixel size of 1 currently outlines the border, as expected, but has issues when outlining the rounded edge; it usually cuts off as seen here:

Expected Behavior

The expected behavior is that the rounded edges get outlined the way the non-rounded sides get handled, like this:

(basically just a black line going smoothly around the edge, instead of cutting off).

Reproduction Instructions

for_window [class=".*"] border pixel 1
border_radius 8

Just add these two lines to your i3 config and reload/restart.

Environment

Output of i3 --moreversion 2>&-:

i3 version:
Binary i3 version:  4.16.1-184-g00181678 (2019-07-03, branch "makepkg") © 2009 Michael Stapelberg and contributors
Running i3 version: 4.16.1-184-g00181678 (2019-07-03, branch "makepkg") (pid 1020)
Loaded i3 config: /home/sam/.config/i3/config (Last modified: Fri 30 Aug 2019 20:29:53 BST, 4377542 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

i3 configuration file is here.

- Linux Distribution & Version: Manjaro Linux 18.0 (Linux Kernel is `5.4.0-1-MANJARO`)
- Are you using a compositor (e.g., xcompmgr or compton): compton
- This issue persists on older kernels too.
resloved commented 4 years ago

Thanks for the very thorough issue!

This problem has been discussed in the past and is probably the last major hurdle functionally. In fact I already have a somewhat working solution that you can find here. It's not quite there because it crashes very easily. I assume this is a result of the pixmap being updated when that isn't expected.

I haven't looked into this further because, to be honest, it wouldn't be a feature I'd use. I'll push the change to a seperate branch and hopefully someone more motivated then me can track down what causes the crash.

resloved commented 4 years ago

The changes are now on the shape-dev branch, you can find them here.

The crash I'm referring to can be reproduced by following these steps:

  1. Create two windows
  2. Create another window in the opposite orientation (if the second window was horizontal, then the third window should be vertical or vice-versa)
  3. Create a forth window with the original orientation.
  4. Delete the last two windows
SamOphis commented 4 years ago

I see, thank you. The crashes won't bother me too much and I'd actually try to help track it down if I was experienced with this sort of stuff. The strokes are mainly for aesthetic reasons, so they're not too important. I'll close this issue because of the changes you made available, thank you.

resloved commented 4 years ago

I think I'm going to leave this open. I'm glad this change works for you, but I'd still like to find a solution and it would be nice to have something open for people that are curious why this hasn't been fixed yet.

MonsieurMan commented 4 years ago

Hello there ! I've been using your fork for the last day and can't live without the rounded corners now. :heart:

So here's the thing, I have plenty of time being confined and I would really like to push this issue further but I don't have much experience with C. Would you have some time for mentoring me in the next 5 or so weeks ?

resloved commented 4 years ago

@MonsieurMan Love to hear when people are interested in working open source, even if they don't have the experience. Working on established code bases is how I learned anything about C so I think it's a great place to start!

As for suggestions:

If you want to try to solve this issue in particular I would suggest just using the shape-dev branch to start. If you create a fair amount of windows you'll see the issue pretty quickly. Things you may need to learn about to get some context:

I'm not in a place to actually mentor someone, but if you have any general questions feel free to DM me on twitter (@resloved) or on reddit (/u/resloves).

MonsieurMan commented 4 years ago

@resloved, that was the kind of 'mentoring' I was looking for. I know time is a precious resource.

Thank you for trying to make me confident facing this big codebase aha !

I'll be sure to DM you on reddit if I make any significant progress or hit a wall. Thank again and see you soon.