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

Part of window disappears on vertical monitor #47

Closed
GlitchyCrafting opened this issue Nov 16, 2022 · 15 comments · Fixed by #112
Closed

Part of window disappears on vertical monitor #47

GlitchyCrafting opened this issue Nov 16, 2022 · 15 comments · Fixed by #112
Labels
bug Something isn't working
Milestone

Comments

@GlitchyCrafting
Copy link
Contributor

GlitchyCrafting commented Nov 16, 2022

Swayfx Version: 0.1-1 from AUR

Using Default Config file but with monitors arranged how I need them.

The bottom corner of any application gets removed, more of that corner disappears when multiple windows are opened and it only affects the bottom-most window. Also affects context menus in Firefox and Chrome. None of these happen on my other two monitors, only my vertical one.

Alacritty

2022-11-15T18:43:56,017473247-06:00

Firefox

2022-11-15T18:44:20,288487318-06:00

Multiple Windows

2022-11-15T18:44:31,823462145-06:00

Chromium

2022-11-15T18:55:07,826845375-06:00

PCManFM-GTK3

2022-11-15T18:57:01,282353951-06:00

@GlitchyCrafting GlitchyCrafting added the bug Something isn't working label Nov 16, 2022
@ErikReider
Copy link
Collaborator

ErikReider commented Nov 16, 2022

What resolution and scaling are you running on that monitor? Does it happen with other resolution and scaling values?

@ErikReider
Copy link
Collaborator

I'm experiencing the same issue. Very weird... Could you check if base sway 1.7 experiences this @GlitchyCrafting

@GlitchyCrafting
Copy link
Contributor Author

I'm experiencing the same issue. Very weird... Could you check if base sway 1.7 experiences this @GlitchyCrafting

It does not. Actually had to go back to base Sway 'cause I use that monitor so much.

@ErikReider
Copy link
Collaborator

ErikReider commented Nov 16, 2022

The even weirder thing about this is that I can't replicate this issue when running swayfx in nested mode (open another swayfx instance inside of swayfx), just when starting it from a tty???

Edit: I've even tried running it nested and creating a dummy output (swaymsg create_output dummy_output) and it still works while nested...

@ErikReider
Copy link
Collaborator

I've narrowed it down to the tex_*.frag shaders. Seems like the quad_round_*.frag shaders ara also experiencing this bug

@ErikReider
Copy link
Collaborator

if (!has_titlebar || gl_FragCoord.y - position.y > radius) {
vec2 corner_distance = min(gl_FragCoord.xy - position, size + position - gl_FragCoord.xy);
if (max(corner_distance.x, corner_distance.y) < radius) {
float d = radius - distance(corner_distance, vec2(radius));
float smooth = smoothstep(-1.0f, 0.5f, d);
gl_FragColor = mix(vec4(0), gl_FragColor, smooth);
}
}

if (!has_titlebar || gl_FragCoord.y - position.y > radius) {
vec2 corner_distance = min(gl_FragCoord.xy - position, size + position - gl_FragCoord.xy);
if (max(corner_distance.x, corner_distance.y) < radius) {
float d = radius - distance(corner_distance, vec2(radius));
float smooth = smoothstep(-1.0f, 0.5f, d);
gl_FragColor = mix(vec4(0), gl_FragColor, smooth);
}
}

if (!has_titlebar || gl_FragCoord.y - position.y > radius) {
vec2 corner_distance = min(gl_FragCoord.xy - position, size + position - gl_FragCoord.xy);
if (max(corner_distance.x, corner_distance.y) < radius) {
float d = radius - distance(corner_distance, vec2(radius));
float smooth = smoothstep(-1.0f, 0.5f, d);
gl_FragColor = mix(vec4(0), gl_FragColor, smooth);
}
}

Seems to be the cause. Do you @WillPower3309 have any idea why this could happen?

@ErikReider
Copy link
Collaborator

Also seems like the rounded corners aren't visible on the vertical monitor either

@WillPower3309
Copy link
Owner

Yup, I think I know exactly what's wrong here! I'll take a look at a fix as soon as I can

@WillPower3309
Copy link
Owner

WillPower3309 commented Nov 16, 2022

I'm experiencing the same issue. Very weird... Could you check if base sway 1.7 experiences this @GlitchyCrafting

Would you mind checking if rounded titlebars are strange too @ErikReider ? No worries if not, I can set up a vertical monitor

@ErikReider
Copy link
Collaborator

Would you mind checking if rounded titlebars are strange too @ErikReider ? No worries if not, I can set up a vertical monitor

I also experienced issues with the filling and the corners of the titlebar. Weird bug :/

@GlitchyCrafting
Copy link
Contributor Author

What resolution and scaling are you running on that monitor? Does it happen with other resolution and scaling values?

Resolution: 1280x1024@75Hz
Scaling: 1.0

@frap129
Copy link

frap129 commented Nov 18, 2022

Yup, I think I know exactly what's wrong here! I'll take a look at a fix as soon as I can

Came here to report the same bug, but it sounds like you've got it handled!

@frap129
Copy link

frap129 commented Dec 19, 2022

Still having this issue on the latest release :(

@WillPower3309
Copy link
Owner

Yup, sorry to say that it has not been fixed yet. Hoping to take a look soon

@WillPower3309 WillPower3309 added this to the 0.3 milestone Dec 27, 2022
@ErikReider
Copy link
Collaborator

image
Maybe the sizing isn't correct?

Also flipping the width/height and x/y seems to do something. It's at least a step in the right direction

glUniform2f(shader->size, dst_box->width, dst_box->height);
glUniform2f(shader->position, dst_box->x, dst_box->y);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants