Skip to content
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

Rounded border #614

Merged
merged 2 commits into from
Apr 12, 2021
Merged

Rounded border #614

merged 2 commits into from
Apr 12, 2021

Conversation

yshui
Copy link
Owner

@yshui yshui commented Apr 11, 2021

No description provided.

@yshui yshui requested a review from tryone144 April 11, 2021 14:28
@yshui
Copy link
Owner Author

yshui commented Apr 11, 2021

This is part of #229

@yshui
Copy link
Owner Author

yshui commented Apr 11, 2021

cc @ibhagwan

@codecov
Copy link

codecov bot commented Apr 11, 2021

Codecov Report

Merging #614 (b2f9f80) into next (9cb552e) will decrease coverage by 0.09%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next     #614       /-   ##
==========================================
- Coverage   39.88%   39.79%   -0.10%     
==========================================
  Files          46       46              
  Lines        9449     9471       22     
==========================================
  Hits         3769     3769              
- Misses       5680     5702       22     
Impacted Files Coverage Δ
src/opengl.c 0.00% <0.00%> (ø)
src/opengl.h 60.46% <ø> (ø)
src/render.c 4.14% <0.00%> (ø)
src/win.c 68.01% <0.00%> (-0.13%) ⬇️
src/win.h 78.12% <ø> (ø)

Copy link
Collaborator

@tryone144 tryone144 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks okay to me.
Unfortunately, I can't really test it locally at the moment as I only have i3's fake borders at hand and my test-system doesn't cooperate.

src/win.c Outdated
Comment on lines 1088 to 1090
// HACK: we reset this so we can query the color once
// we query the color in glx_round_corners_dst0 using glReadPixels
// w->border_col = { -1., -1, -1, -1 };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for consistency, the function is now called glx_round_corners_dst() and the first value for border_col is written with a trailing dot.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks for pointing it out!

@yshui
Copy link
Owner Author

yshui commented Apr 12, 2021

@tryone144 I think the approach should work with "fake" borders

Edit: ah, no. Because border width detection wouldn't work... Related: i3/i3#4292

@yshui yshui merged commit 468d8a0 into next Apr 12, 2021
@yshui yshui deleted the rounded-border branch April 12, 2021 08:32
@owl4ce
Copy link

owl4ce commented May 30, 2021

Hi, is it possible to turn off borders on this window?

2021-05-30-095805_379x397_scrot
2021-05-30-100850_266x216_scrot
2021-05-30-095821_833x382_scrot

This only happens when turning on rounded corners with the glx backend. I use OpenboxWM.

@ibhagwan
Copy link

This only happens when turning on rounded corners with the glx backend. I use OpenboxWM.

That’s because rounded borders are only supported on glx.

You can turn it off globally with the round-borders = 0; option or individually with the round-borders-exclude option, use xprop for the windows you’d like it turned off and refer to picom.sample.conf if you’re unclear how to use the option.

@owl4ce
Copy link

owl4ce commented May 30, 2021

This only happens when turning on rounded corners with the glx backend. I use OpenboxWM.

That’s because rounded borders are only supported on glx.

You can turn it off globally with the round-borders = 0; option or individually with the round-borders-exclude option, use xprop for the windows you’d like it turned off and refer to picom.sample.conf if you’re unclear how to use the option.

Using all border options doesn't work to disable. It only happens in Openbox's own drawn window and can't use xprop because of conflict when grabbing the cursor.

EDIT: That includes this rule "! name~=''"

@ibhagwan
Copy link

This only happens when turning on rounded corners with the glx backend. I use OpenboxWM.

That’s because rounded borders are only supported on glx.
You can turn it off globally with the round-borders = 0; option or individually with the round-borders-exclude option, use xprop for the windows you’d like it turned off and refer to picom.sample.conf if you’re unclear how to use the option.

Using all border options doesn't work to disable. It only happens in Openbox's own drawn window and can't use xprop because of conflict when grabbing the cursor.

EDIT: That includes this rule "! name~=''"

I took a quick glance at the code, I don’t think the border exclude options were implemented here yet, if you’d like to give these options a try use my fork instead.

@owl4ce
Copy link

owl4ce commented May 30, 2021

Solved for temporary, back using picom from this commit.
9cb552e

@tryone144 tryone144 mentioned this pull request Jul 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants