capacitor-community / electron

Deploy your Capacitor apps to Linux, Mac, and Windows desktops, with the Electron platform! 🖥️
https://capacitor-community.github.io/electron/
MIT License
318 stars 58 forks source link

BrowserWindow options not get reflected after changing 2nd time #205

Open Tejas1920 opened 1 year ago

Tejas1920 commented 1 year ago

Describe the bug I have created a blank angular project and used the plugin Once I set the BrowserWindow option fullscreen to true it applies and removed the windows close/minimize/maximize buttons and frame after that again if I remove fullscreen: true option from BrowserWindow and run below command npx cap open @capacitor-community/electron it does not apply the BrowserWindow options and the electron app remains in full screen and cannot see frame and close/minimize/maximize buttons

To Reproduce Steps to reproduce the behavior:

  1. ng new demo
  2. npm i @capacitor/core
  3. npm i @capacitor/cli --save-dev
  4. npm i @capacitor-community/electron
  5. npx cap init
  6. Go to Angular.json and change outputPath to 'www'
  7. In capacitor.config.ts change webDir value to 'www'
  8. ng build
  9. npx cap add @capacitor-community/electron
  10. npx cap open @capacitor-community/electron ----- > works great
  11. Go to folder electron > src > setup.ts
  12. add option fullscreen: true in [this.MainWindow = new BrowserWindow({] below code http://prntscr.com/v2SQNTPSPmBe
  13. npx cap open @capacitor-community/electron ----- > Removed windows fame and close/minimize/maximize buttons
  14. now remove the option added on point no 12 means undo the change or removed fullscreen: true from BrowserWindow options
  15. npx cap open @capacitor-community/electron ----- > Removed windows fame and close/minimize/maximize buttons --> same as point no 13

Expected behavior pont 15 should run the app with the frame and close/minimize/maximize buttons same as point no 10.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context It works with changing the height and width options but once fullscreen is set to ture , cannot be undone