-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: toggle_floating_state and is_floating (#306) #307
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation looks good 👍
If you can add some teats for the toggle method then this should be good to merge.There are equivalent tests for similar methods in the file already using the test_case macro to cover the different cases you highlight in the doc comment.
src/pure/stack_set.rs
Outdated
Ok(if self.is_floating(&client) { | ||
self.sink(&client) | ||
} else { | ||
self.float(client, r)?; | ||
None | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be bound to a variable and returned as Ok(rect)
rather wrapping the whole if statement
…g_state; testcase: floating_client_status tests is_floating;
I tried to split |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor style things but I'll fix those up post merge rather than nitpicking on this PR 🙂
Thank you for taking the time to contribute to Penrose!
In order to resolve issue #306
Adds: