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

[Bug]: Windows explorer restart does not respect BrowserWindow skipTaskbar setting #29526

Closed
3 tasks done
ben-polinsky opened this issue Jun 3, 2021 · 8 comments
Closed
3 tasks done

Comments

@ben-polinsky
Copy link

ben-polinsky commented Jun 3, 2021

Preflight Checklist

Electron Version

12.0.5 / 13.0.1

What operating system are you using?

Windows

Operating System Version

Windows 10 19H2 (18363) and Windows 10 2004

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

When restarting (or stopping and starting) Windows Explorer, Electron should respect a BrowserWindow's skipTaskbar: true value and not display an icon in the taskbar.

Actual Behavior

When a BrowserWindow has skipTaskbar set to true and Windows Explorer is restarted, an icon appears in the taskbar.

Testcase Gist URL

https://gist.github.com/not-the-car/94ea2fa217d064b23cbe1f5893f3f2bf

Additional Information

I've provided the fiddle above, but all you need to do is set skipTaskbar to true and restart Explorer through the Task Manager to reproduce.

@nornagon
Copy link
Member

@zcbenz is this even possible to do? It looks like the current method uses a COM method to remove the icon from the task bar on window construction. How would we detect the explorer.exe restart?

I don't think this issue is "beginner friendly" at all.

@zcbenz
Copy link
Member

zcbenz commented Jun 23, 2021

The tray icon implementation is already doing it, all tray icons are recreated when explorer is restarted:
https://github.com/electron/electron/blob/main/shell/browser/ui/win/notify_icon_host.cc#L65-L67

@nornagon
Copy link
Member

Ah, TIL! That's a handy point of reference.

@ben-polinsky
Copy link
Author

I'll attempt to build from source and get a fix in. We'll see how it goes.

@bruceauyeung
Copy link
Contributor

bruceauyeung commented Feb 24, 2022

problem still exists in electron 17.0.1
os:windows 7, windows 10
any plans ?

@lyswhut
Copy link

lyswhut commented Oct 3, 2022

Any news?

After restarting explorer, skipTaskbar and setThumbarButtons, tray.setToolTip will be invalid.

To reproduce:
After setting the above options, open the task manager, find it and restart
image

Then you need to re-call win.setSkipTaskbar(true) and tray.setToolTip, but win.setThumbarButtons is no longer valid (although calling it returns true)

OS: Windows 10
Electron: 19.1.1

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Jan 10, 2023
@github-actions
Copy link
Contributor

This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 10, 2023
1j01 added a commit to 1j01/tracky-mouse that referenced this issue Apr 17, 2024
If Windows Explorer is restarted, the Tracky Mouse Screen Overlay window
appears in the taskbar.
See: #47
And: electron/electron#29526

This partially remedies the situation, by handling the case where the
user can try to close the screen overlay window, which isn't supposed
to be possible.
1j01 added a commit to 1j01/tracky-mouse that referenced this issue Apr 17, 2024
If Windows Explorer is restarted, the Tracky Mouse Screen Overlay window
appears in the taskbar.
See: #47
And: electron/electron#29526

This partially remedies the situation, by handling the case where the
user can try to close the screen overlay window, which isn't supposed
to be possible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants