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

Resize behavior [Linux] #8

Open
gysddn opened this issue Sep 24, 2024 · 1 comment
Open

Resize behavior [Linux] #8

gysddn opened this issue Sep 24, 2024 · 1 comment

Comments

@gysddn
Copy link
Contributor

gysddn commented Sep 24, 2024

The API function Resize works but it undoes the effects of SetSize, also noted here. This might be an intended behavior on gtk side, but I'm not sure if it is for the API.

Should this be updated so that it preserves the current size?

@gysddn gysddn changed the title Resize behavior Resize behavior [Linux] Sep 24, 2024
@gysddn
Copy link
Contributor Author

gysddn commented Sep 25, 2024

My understanding is that, it is indeed an "intended behavior". When the Window:resizable property is set to false, all resize requests get wiped, these include the calls to gtk_window_resize as well.

I have tried an approach to handle that on the API side here:
gysddn@e4f3125#diff-913e4600c263568cc8efab501163d3008a7ea456cca9a2fcd07fa2c93dc0db0dR20

This works mostly fine, except the case where user changes the size of the window with mouse before setting resizable to false, this ends up reverting back the size to the last call of SetSize because that's where the internal size is updated.

Ultimately, the GdkConfigure(Resize & Move) event should update the internal size but that requires API's window object to be passed onto the gtk event, and I'm trying figure out how to do that now.

@gysddn gysddn mentioned this issue Sep 27, 2024
24 tasks
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

No branches or pull requests

1 participant