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

Add window tiling support #105

Merged
merged 11 commits into from
Feb 2, 2024
Merged

Add window tiling support #105

merged 11 commits into from
Feb 2, 2024

Conversation

matinlotfali
Copy link
Owner

This new feature closes #104

@matinlotfali matinlotfali added the Almost Ready The item is almost ready to be merged/resolved. label Aug 15, 2023
@lomenzel
Copy link
Contributor

will this also disable rounded corners on tiled windows with a gap? because there it would be nice to keep it

@matinlotfali
Copy link
Owner Author

will this also disable rounded corners on tiled windows with a gap?

I am new to tiling windows. How would someone tile windows with a gap? Can you show me?

@lomenzel
Copy link
Contributor

image
i use the polonium addon (so i guess this uses the tiling api introduced in 5.27) so technically they are tiled, but they dont touch each other.

@matinlotfali
Copy link
Owner Author

It looks like polonium implements its own algorithm and modifications for tiling.

Sadly, my only dependency (KWinEffect library) doesn't provide me with signals to monitor the tiling state. So I had to write my own algorithm to just detect the tiling situation on every window.

This means with my algorithm, even if you just drag and move your windows in a way that they cover the width or height of the screen, it would be considered a tiled situation.

I don't know how crazy it would be to check if the space between screen edges and windows are the same, it would also be considered a tiled situation...

@matinlotfali
Copy link
Owner Author

@lomenzel I am assuming that the gap is just one number that is used everywhere (horizontally, vertically, edges of screen, and between windows)?

@lomenzel
Copy link
Contributor

Yes

@lomenzel
Copy link
Contributor

This means with my algorithm, even if you just drag and move your windows in a way that they cover the width or height of the screen, it would be considered a tiled situation.

That is perfect. If tiled with gaps the rounded corners are perfect and should stay

@matinlotfali
Copy link
Owner Author

@lomenzel I implemented the gap calculation but I can't test it. Can you test it for me?

@lomenzel
Copy link
Contributor

It works just fine all floating windows have round corners tiled ones not. 😁, Except for the toggle "disable roundness on Tile/maximize" it only affects the maximized but not the tiles ones, they always have no roundness regardless of the setting.

@matinlotfali
Copy link
Owner Author

I guess I can't run away from installing polonium on my computer to figure out what is hapenning.

@lomenzel
Copy link
Contributor

I thought polonium just uses the tiling feature of plasma itself. Pressing meta+t lets you make a layout and then drag the windows while holding shift into the tiling zone. In the meta+t screen you can also set the padding

@matinlotfali
Copy link
Owner Author

Pressing meta+t lets you make a layout and then drag the windows while holding shift into the tiling zone

Fantastic! I didn't know that at all. Thanks for teaching me.
I used this to fix my code. Can you try it again?

@matinlotfali matinlotfali added the Testing This is just for a test. It might not get merged. label Dec 12, 2023
@matinlotfali matinlotfali force-pushed the tiles branch 2 times, most recently from 8169528 to 3247967 Compare January 24, 2024 20:32
@guzman109
Copy link

Does this work? I have the main branch installed but do not see a difference

@matinlotfali
Copy link
Owner Author

@guzman109 It should work. Post an issue with screenshots and debug logs if it doesn't

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Almost Ready The item is almost ready to be merged/resolved. Testing This is just for a test. It might not get merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Firefox is showing the borders even on fullscreen Hide Rounded corners when window is tiled
3 participants