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

Hide icon of modal dialog on Windows #22105

Open
lutzroeder opened this issue Feb 8, 2020 · 12 comments
Open

Hide icon of modal dialog on Windows #22105

lutzroeder opened this issue Feb 8, 2020 · 12 comments

Comments

@lutzroeder
Copy link
Contributor

@lutzroeder lutzroeder commented Feb 8, 2020

Is there a way to hide the icon of a BrowserWindow on Windows?

Expected:
Screen Shot 2020-02-08 at 11 28 08 AM

Actual:
Screen Shot 2020-02-08 at 11 27 35 AM

Repro:
electron-22105.zip

@julienpan
Copy link

@julienpan julienpan commented Feb 19, 2020

Hi, I'd like to work on this, I would like to have more information about how to start on it.

@VVlasy
Copy link

@VVlasy VVlasy commented Feb 21, 2020

@julienpan Hi, start off by compiling your own build of Electron as described here.

@VVlasy
Copy link

@VVlasy VVlasy commented Feb 22, 2020

@lutzroeder @MarshallOfSound What is the proposed solution?

There a few I had in mind.

  1. Handle null value for icon property of electron.BrowserWindow and when set to null remove window icon instead of throwing up an error file not found

  2. Remove icon from window when it is set as modal on Windows

  3. Add property showWindowIcon that is by default set to true, could be set to false by default on modal windows as well.

@lutzroeder
Copy link
Contributor Author

@lutzroeder lutzroeder commented Feb 22, 2020

The first two options would change the behavior in existing apps.

Maybe setting icon to electron.nativeImage.createEmpty() and checking icon && icon.isEmpty() would work?

See also https://stackoverflow.com/questions/53880863/electron-cant-hide-program-icon-in-browserwindow

@VVlasy
Copy link

@VVlasy VVlasy commented Feb 22, 2020

And after the check in JS make a callback to c++ -> platform specific implementations

@elizaho
Copy link

@elizaho elizaho commented Mar 17, 2020

Did this ever get resolved, or is this still an issue that someone can work on? If no one is working on it right now, I'd like to work on it. Are you still working on it? @julienpan

@Falgu9
Copy link

@Falgu9 Falgu9 commented Mar 19, 2020

Hi ! I can also help if @julienpan or @elizaho didnt start to fix this issue. Give news if you can please !

@aritramullick
Copy link

@aritramullick aritramullick commented May 6, 2020

I would be interested in helping if this hasn't been resolved yet. However, I am a first-timer and I dont really know exactly how to go about this.

@rghv9
Copy link

@rghv9 rghv9 commented May 10, 2020

inspect it
and do in its css file and set
display:"none";

@Aryan-Sihag
Copy link

@Aryan-Sihag Aryan-Sihag commented May 14, 2020

hey i am new to github and i want to make some early contributions , i think i can work on it and i would like to get some instructions on how to get started.

@mahdi-farnia
Copy link

@mahdi-farnia mahdi-farnia commented May 16, 2020

Hello i think the best way is hiding browser frames...
and Create another one with your custom items.
You now how.. right??

@lutzroeder
Copy link
Contributor Author

@lutzroeder lutzroeder commented May 16, 2020

The goal is not to find a workaround but fix the underlying issue in Electron. This probably requires understanding how Electron creates the native HWND on Windows and apply this flag if the dialog is modal and icon.isEmpty().

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

Successfully merging a pull request may close this issue.

None yet
10 participants
You can’t perform that action at this time.