Nothing Special   »   [go: up one dir, main page]

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

view: don't try to restore to very small width/height on unmaximize #1938

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

tokyo4j
Copy link
Contributor
@tokyo4j tokyo4j commented Jun 28, 2024

Thonny (Python IDE made with Tk) may set the window geometry to 1x1 and maximizes the window before mapping. This set view->natural_geometry to 1x1, so labwc tried to restore the window geometry to it on unmaximize, causing validation errors in ssd_update_geometry() as its width and height are smaller than LAB_MIN_VIEW_{WIDTH,HEIGHT}.

This PR fixes it by not allowing geometries smaller than LAB_MIN_VIEW_{WIDTH,HEIGHT} in view->natural_geometry.

Closes #1921.

Thonny (Python IDE made with Tk) may set the window geometry to 1x1 and
maximizes the window before mapping. This set `view->natural_geometry`
to 1x1, so labwc tried to restore the window geometry to it on
unmaximize, causing validation errors in `ssd_update_geometry()` as its
width and height are smaller than `LAB_MIN_VIEW_{WIDTH,HEIGHT}`.

This commit fixes it by not allowing geometries smaller than
`LAB_MIN_VIEW_{WIDTH,HEIGHT}` in `view->natural_geometry`.
@Consolatis Consolatis merged commit 74e1ba7 into labwc:master Jun 28, 2024
6 checks passed
@Consolatis
Copy link
Member

Nice find!

@tokyo4j tokyo4j deleted the fix-tk branch June 28, 2024 12:19
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 this pull request may close these issues.

Very odd Thonny behaviour when unmaximising a window
2 participants