wails icon indicating copy to clipboard operation
wails copied to clipboard

In frameless mode, the minimum method call of MacOS does not take effect

Open JinCodeHub opened this issue 3 years ago • 2 comments

Description

When I use the latest version, I encounter this problem. Switching to version 33 doesn't work. It's normal under win11. It's normal when I turn off frameless mode

To Reproduce

main.go

err := wails.Run(&options.App{
		Title:             "jl-tool",
		Width:             900,
		Height:            600,
		MinWidth:          900,
		MinHeight:         600,
		MaxWidth:          1200,
		MaxHeight:         800,
		DisableResize:     false,
		Fullscreen:        false,
		Frameless:         true,
		StartHidden:       false,
		HideWindowOnClose: false,
		RGBA:              &options.RGBA{R: 255, G: 255, B: 255, A: 0},
		Assets:            assets,
		Menu:              nil,
		Logger:            nil,
		LogLevel:          logger.DEBUG,
		OnStartup:         app.startup,
		OnDomReady:        app.domReady,
		OnBeforeClose:     app.beforeClose,
		OnShutdown:        app.shutdown,
		WindowStartState:  options.Normal,
		Bind: []interface{}{
			app,
		},
		// Windows platform specific options
		// Windows平台特定选项
		Windows: &windows.Options{
			WebviewIsTransparent:              true,
			WindowIsTranslucent:               true,
			DisableWindowIcon:                 true,
			DisableFramelessWindowDecorations: false,
			WebviewUserDataPath:               "",
		},
		// Mac platform specific options
		// Mac平台特定选项
		Mac: &mac.Options{
			TitleBar:             mac.TitleBarHiddenInset(),
			Appearance:           mac.DefaultAppearance,
			WebviewIsTransparent: true,
			WindowIsTranslucent:  true,
			About: &mac.AboutInfo{
				Title:   "Wails Template Vue",
				Message: "A Wails template based on Vue and Vue-Router",
				Icon:    icon,
			},
		},
	})

frontend

const onclickMinimise = () => {
      window.runtime.WindowMinimise()
    };

Expected behaviour

Using custom buttons in frameless mode can also be minimized

Screenshots

No response

Attempted Fixes

No response

System Details

Wails CLI v2.0.0-beta.33


Scanning system - Please wait (this may take a long time)...Done.

System
------
OS:		MacOS
Version: 	12.3.1
ID:		199506
Go Version:	go1.18.1
Platform:	darwin
Architecture:	arm64

Dependency			Package Name	Status		Version
----------			------------	------		-------
xcode command line tools 	N/A		Installed	2395
npm 				N/A		Installed	8.8.0
*upx 				N/A		Available
*nsis 				N/A		Available

* - Optional Dependency

Diagnosis
---------
Your system is ready for Wails development!
Optional package(s) installation details:
  - upx : Available at https://upx.github.io/
  - nsis : Available at https://nsis.sourceforge.io/Download

Additional context

No response

JinCodeHub avatar May 03 '22 01:05 JinCodeHub

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 10 '22 14:07 stale[bot]

@layxyer I believe this is fixed in the latest release. Please let us know 🙏

leaanthony avatar Jul 10 '22 20:07 leaanthony

not the author, but latest release, minimized on macOS frameless windows still seems to do nothing at all, no errors anywhere either

theMackabu avatar Aug 05 '22 15:08 theMackabu

@theMackabu - Please try the above PR to see if this fixes your problem. If you are unsure how to do this, please follow this guide. Let us know how you get on 👍

leaanthony avatar Aug 07 '22 00:08 leaanthony

Merged to master and will be in next release. The guide will also explain how to test on master 👍

leaanthony avatar Aug 08 '22 07:08 leaanthony