-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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
Add setThumbnailClip API on Windows #6497
Conversation
👍 |
Is there a way to reset it afterwards? |
@kevinsawicki I'm not sure this really closes the issue, what if I want to provide my own image that is not related to currently displayed window without clipping ? |
To be honest when I saw that original issue this was the API I was imagining 😄 https://msdn.microsoft.com/en-us/library/dd389410(v=vs.85).aspx Let's you set a custom BitMap to be the live preview. Not quite sure how this would fit into an electron API though 👍 |
You can reset it by passing in an empty area |
@YurySolovyov @MarshallOfSound Yeah, setting a thumbnail image would be useful to have in addition to this API. I created a new issue specifically for it at #6508 👍 |
Have you tried this API on a non-100% DPI display? I suspect you need to do some multiplication to convert 96DPI pixel units to HWND pixels |
This pull requests adds a
setThumbnailClip(region)
API toBrowserWindow
instances on Windows that can be used to control which region of the window is used to generate the thumbnail image displayed in the taskbar when the window is hoverered over.For the sample Electron app if you called it as:
It would change the taskbar thumbnail from:
setThumbnailClip
This can be useful for media-related apps that want the thumbnail to be the specific content such as an image, video element, etc.
Closes #2623