Skip to content

sway/commands: Handle incorrect resize unit #8640

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sahinf
Copy link
Contributor

@sahinf sahinf commented Apr 1, 2025

problem: an invalid usage of the command resize set will cause sway to crash because it doesn't check for an invalid height.

solution:

  1. validate height along with width
  2. collect all the resize returns into a var in order to log potential errors before returning, so the user has more context as to why the resize config did not work.

fixes #8619

@sahinf sahinf force-pushed the fix-resize-crashing branch from d302b54 to d646a4e Compare April 2, 2025 02:41
@sahinf sahinf force-pushed the fix-resize-crashing branch from d646a4e to 86c68c8 Compare April 11, 2025 17:04
@sahinf sahinf force-pushed the fix-resize-crashing branch 2 times, most recently from 2dad368 to 02b3c6f Compare April 13, 2025 17:58
problem: an invalid usage of the command resize set will cause sway to crash because it doesn't check for an invalid height.
solution: validate height along with width.
@sahinf sahinf force-pushed the fix-resize-crashing branch from 02b3c6f to 0e4903d Compare April 24, 2025 19:42
@sahinf
Copy link
Contributor Author

sahinf commented Apr 24, 2025

@emersion Thanks, I incorporated your feedback and rebased on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Sway crashes if 'pt' used for resize set width/height units, instead of 'px'
2 participants