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

Tofi not respecting anchor and resolution/scaling on Niri #165

Open
Motodavide opened this issue May 14, 2024 · 3 comments · May be fixed by #189
Open

Tofi not respecting anchor and resolution/scaling on Niri #165

Motodavide opened this issue May 14, 2024 · 3 comments · May be fixed by #189

Comments

@Motodavide
Copy link

2024-05-14T22-27-53

As the title and the image say tofi doesn't seem to acknowledge screen parameters on Niri. I don't know how to debug so this is all I got (in theory Niri supports layer-shell).

@itshog
Copy link

itshog commented Aug 11, 2024

I faced the same issue, which also happens with bemenu albeit in a different manner (anchor is ignored, but the sizing is too and the content doesn't get stretched as in tofi).

After some testing, it turns out that anchoring is ignored also by plasma's kwin (so maybe the code in tofi and bemenu uses something specific to wlroots), while the sizing issue happens only in compositors using smithay like niri (so it may be a bug/omission in smithay).

See the related issues:

@itshog
Copy link

itshog commented Aug 11, 2024

As a side note, both anchoring and sizing work properly under kwin and smithay compositors when using fuzzel, so maybe there's a way to implement these options in a more "generic" way which works across wlroots, kwin and smithay at the same time

@itshog
Copy link

itshog commented Aug 11, 2024

I found the cause of the bug by comparing tofi's code for centering to fuzzel's code: basically, instead of specifying all anchors to center the surface, as tofi does, it should specify no anchor at all. See this fuzzel commit.

I'll try writing a patch this evening.

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 a pull request may close this issue.

2 participants