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

Fullscreen (F11) & Hide (H) Not working #45

Closed
darkstudioteam opened this issue Jul 11, 2017 · 4 comments
Closed

Fullscreen (F11) & Hide (H) Not working #45

darkstudioteam opened this issue Jul 11, 2017 · 4 comments
Labels

Comments

@darkstudioteam
Copy link

Not working

  1. Hide
  2. Fullscreen

Inside VIEW in the Toolbar. Both button and shortcuts.

Windows 10 64bit

@cassidoo cassidoo added the bug label Jul 11, 2017
@jaslloyd
Copy link

Hey guys, I cloned the repo and tried changing (fullscreenable: true)
mainWindow = new BrowserWindow({ width: 800, minWidth: 800, height: 600, fullscreenable: **true**, backgroundColor: '#403F4D', icon: path.join(__dirname, 'assets/png/128x128.png') });

And now full screen works on windows.(Don't have mac so cannot test on OSX). However, it still shows the menu like so:
fullscreen

@cassidoo if you have already fixed this sorry for relooking :)

@cassidoo
Copy link
Owner

cassidoo commented Aug 5, 2017

Thanks for looking into it!! And sorry for being slow to reply here.
I have a commit almost ready to go for this part, just have to figure out the Hide function. Might have to be a separate release.

@jaslloyd
Copy link

@cassidoo I looked into the Hide function, I found this on the electron menu wiki:

macOS has provided standard actions for some menu items, like About xxx, Hide xxx, and Hide Others. To set the action of a menu item to a standard action, you should set the role attribute of the menu item.

I am taking that to mean, the standard {role: 'hide'} does nothing on Windows which from my testing is true. I modified it to simply run mainWindow.hide() when it is clicked and now it is working. I can submit a PR for it if you like?

One thing I opened #48 which will put a taskbar icon in windows when minimized/closed like OS X. Until that is implemented when you 'hide' the application on windows there is no way to restore the window. I have the code ready to go for both issues, once fully tested will I can go ahead and submit a PR?

Jason

@cassidoo
Copy link
Owner

Fixed this in the version 2 PR that'll be released soon™

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants