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

not emit 'maximize' event when click 'maximize' button #66

Closed
CharellKing opened this issue Nov 4, 2015 · 1 comment
Closed

not emit 'maximize' event when click 'maximize' button #66

CharellKing opened this issue Nov 4, 2015 · 1 comment

Comments

@CharellKing
Copy link

CharellKing commented Nov 4, 2015

I create a 'browser-window'; it not emit 'maximize' event when I click 'maximize' button; To my surprised, these events('closed', 'minimize' etc) are ok.

this's my test code on max os x:

var main_window = new BrowserWindow({'accept-first-mouse': true, 'min-width': 500, 'min-height': 200, icon: tray_icon_path, 'title-bar-style': 'hidden', 'fullscreen': 'true'});
main_window.loadUrl(`file://${__dirname}/index.html`);

main_window.on('maximize', function() {
    console.log('maximize');
    main_window.maximize();
});
@bibhas2
Copy link

bibhas2 commented Feb 21, 2016

This is not related to photonkit. You may want to open an issue with Electron.

In ay case, I gave it a try and it seems to work fine. You should not call main_window.maximize(); from the event handler. There's no need for it.

main_window.on('maximize', function() {
    console.log("I am maximized.");
  });

Also, console.log is printed on the terminal window and not in Chrome developer tool.

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

2 participants