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

[Linux] DisableResize option not working #2780

Closed
ramy100 opened this issue Jul 18, 2023 · 6 comments · Fixed by #2863
Closed

[Linux] DisableResize option not working #2780

ramy100 opened this issue Jul 18, 2023 · 6 comments · Fixed by #2863
Labels
Bug Something isn't working

Comments

@ramy100
Copy link

ramy100 commented Jul 18, 2023

Description

when adding the DisableResize = true option it doesn't work .. and it shrinks the window to the minimum width and height while still being resizable

To Reproduce

  1. create new wails project wails init -n myproject -t react-ts
  2. add DisableResize: true to the app options
  3. run the app using wails dev

Expected behaviour

expected the app window to have a fixed size and width

Screenshots

1

Attempted Fixes

No response

System Details

Wails CLI v2.5.1

 SUCCESS  Done.                                                                                                                                                                  

# System

OS           | Zorin OS
Version      | 16      
ID           | zorin   
Go Version   | go1.20.5
Platform     | linux   
Architecture | amd64   

# Wails

Version         | v2.5.1
Package Manager | apt   

# Dependencies

Dependency | Package Name          | Status    | Version                
*docker    | docker.io             | Installed | 24.0.4                 
gcc        | build-essential       | Installed | 12.8ubuntu1.1          
libgtk-3   | libgtk-3-dev          | Installed | 3.24.20-0ubuntu1.1     
libwebkit  | libwebkit2gtk-4.0-dev | Installed | 2.38.6-0ubuntu0.20.04.1
npm        | npm                   | Installed | 9.6.4                  
*nsis      | nsis                  | Installed | v3.05-2                
pkg-config | pkg-config            | Installed | 0.29.1                 
* - Optional Dependency

# Diagnosis

Your system is ready for Wails development!
 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

Additional context

No response

@ramy100 ramy100 added the Bug Something isn't working label Jul 18, 2023
@ramy100 ramy100 changed the title DisableResize option not working [Linux] DisableResize option not working Jul 18, 2023
@zveinn
Copy link

zveinn commented Jul 27, 2023

Can confirm this doesn't work on Debian KDE desktop environment

@leaanthony
Copy link
Member

Have you used git bisect to determine if it ever worked in KDE?

@zveinn
Copy link

zveinn commented Jul 27, 2023

I did not, but I just figured I´d add it to the comment since the original author is using zorin OS which only support GNOME and XFACE according to it´s documentation

@lyimmi
Copy link
Contributor

lyimmi commented Aug 27, 2023

I can confirm that the resize disabling is not working on Ubuntu 23.04 gnome either.

I went back to the 2.0.0 release and its broken there too, I think its not a Wails problem. 😕 I'm trying to figure it out.

@lyimmi
Copy link
Contributor

lyimmi commented Aug 27, 2023

I found the problem. In the NewWindow function we set the window's initial size with gtk_window_resize, if I set the initial size with gtk_window_set_default_size everything works as expected.

I'll make a PR for this.

edit: I clearly remember this working. I don't know, maybe GTK changed something?

This was referenced Aug 27, 2023
@lyimmi
Copy link
Contributor

lyimmi commented Aug 27, 2023

@ramy100, @zveinn I made a PR could you please test it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants