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

Bugfix/linux warnings #1656

Merged
merged 8 commits into from
Aug 3, 2022
Merged

Bugfix/linux warnings #1656

merged 8 commits into from
Aug 3, 2022

Conversation

leaanthony
Copy link
Member

Multiple fixes for Linux warnings.
Fixes #1654
Fixes #1653

@cloudflare-pages
Copy link

cloudflare-pages bot commented Jul 26, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 502c7a6
Status: ✅  Deploy successful!
Preview URL: https://d57d1092.wails-website.pages.dev
Branch Preview URL: https://bugfix-linux-warnings.wails-website.pages.dev

View logs

@leaanthony
Copy link
Member Author

@ianmjones - Please let me know if this fixes the warnings for you 👍

@leaanthony leaanthony enabled auto-merge (squash) July 26, 2022 10:38
v2/internal/appng/app_production.go Show resolved Hide resolved
@@ -63,7 +74,10 @@ static void SetMinMaxSize(GtkWindow* window, int min_width, int min_height, int
size.min_width = size.min_height = size.max_width = size.max_height = 0;

GdkRectangle monitorSize = getCurrentMonitorGeometry(window);
int flags = GDK_HINT_MAX_SIZE | GDK_HINT_MIN_SIZE;
if( isNULLRectangle(monitorSize) ) {
return;
Copy link
Collaborator

@stffabi stffabi Jul 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure, do we still apply the constraints for a minimum or maximum in the options.Options?

IIRC the call to SetMinMaxSize for those is also very early and if the monitorSize couldn't be determined we would skip applying the constraints.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't confirm tonight but it's interesting it worked at all with a null window. Potentially we'll need to hook on the "present"(?) Signal.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the fix may cause issues with fullscreen.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm min/max options do not get set on this branch.

Copy link
Contributor

@ianmjones ianmjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed the warnings for me. 🎉

I didn't have any issues using WindowFullscreen() from JS either. 🤷

@leaanthony
Copy link
Member Author

Min/Max size appears to work for me now after merging master.

@leaanthony leaanthony merged commit baff28b into master Aug 3, 2022
@leaanthony leaanthony deleted the bugfix/linux-warnings branch August 3, 2022 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants