You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As commented here, #949 (comment) - transparent windows unfortunately are of limited use unless you can click through the transparent area.
I noticed that in the documentation it is stated that this is blocked by an upstream bug. The nw.js project DOES have support for this, but i'm not sure how different their implementation is...
I think this is worth the issue to track discussion and implementation, so here it is.
Reacted by Daniel Weinand, Marc Fowler, Luke Page, Mike Powers, Ben "Pig" Chu, Dmitry Wolf, Chris Marsh, Tim van den 🔚, Aaron, Aayush Kapoor and 145 more
While nw.js does support it, it comes with some pretty hefty drawbacks. First of all it requires disabling GPU acceleration, and secondly it only works on OS X and Windows (based on their documentation).
Interested in hearing the latest on this. For my purposes, I'd love if we could set a transparent window to have no click area. So you could have an always-on-top full screen overlay that didn't catch clicks.
Reacted by Albin Ekblom, Christopher Shroba, dani guardiola, Paulius, dschu012, Miguel Angelo, Oliver Anteros, Ryan Bell, Ikbel, k26pl and 5 more
I'm interested too, i'm building an app with a semi transparent window that's on top of other applications but mouseevents need to get through to the other applications.
#11[email protected]
You know, just btw, people in Atom team can do it by themselves if their users need it, right?
so nothing is currently going to happen until someone on the atom team decides to do it or persuades the chrome team it is worth putting on their backlog (and they said it was low priority).
Assuming this won't be resolved through the Chromium code, is there a plausible way to have the application listen for a click event and then trigger the proper counterpart in GTK or similar?
Now the top transparent window is not visible anymore, the button Click me in the underneath window is clickable and the screen.getCursorScreenPoint() yields its output
But, still, I'm not able to get the correct mouse position with getCursorScreenPoint().... I mean... what I would like to do is to get, in the transparent window, child_window, the position {x, y} of the mouse when clicking on the underneath window
Wow ...... I do not understand how you are actually using the screen.getCursorScreenPoint 's ouput:
How are you passing the cursor position from the transparent window to the underneath window , and viceversa, from the underneath window to the transparent window? Through electron.ipcSend ?
@raphael10-collab
If use my code, clicking on the transparent area of the window no longer generates any mouse events for the window. To be precise, the transparent window will be set to ignore any mouse events when the mouse is over the transparent area. only the content below the transparent window will be clicked.
Also, if you want to get the clicked position, you should get the clicked position from the window that was actually clicked.
win.setIgnoreMouseEvents(ignore[, options])
ignore boolean
options Object (optional)
forward boolean (optional) macOS Windows - If true, forwards mouse move messages to Chromium, enabling mouse related events such as mouseleave. Only used when ignore is true. If ignore is false, forwarding is always disabled regardless of this value.
Makes the window ignore all mouse events.
All mouse events happened in this window will be passed to the window below this window, but if this window has focus, it will still receive keyboard events
should be fine....
Is this not enough for Linux ?
Why x and y do not change, based on the mouse events? :
I do not understand why this message sent from the child_window (the transparent window on top of the other window) is not received in the main process:
I've noticed that the Electron API setShape can solve some problems, similar to the Windows setWindowRgn. It allows areas without a set shape to be non-drawable and lets mouse events pass through.
This solved my problem. If your page's displayed content is not complex, you can use this API.
Reacted by Xianqiao Wang, Eddie Hsu, zxffffffff, Coral and C6H5FJokey
win.SetShape is currently only supported (experimentally) on Windows and Linux. Are there any efforts towards implementing this on macOS? (and removing it from its 'experimental' state)
After setting transparent on Windows, click-through functionality is enabled, but this currently does not work on Linux.
My solution involves using setShape: by monitoring DOM changes via a MutationObserver, I retrieve the dimensions of each visible element, assemble them into a rect array representing the window, and then invoke setShape.
I have defined a global variable to toggle between "Interactive" or "click-through" in my front end. I set this value based on mouse events like onMouseEnter onMouseLeave, etc..
I have defined a global variable to toggle between "Interactive" or "click-through" in my front end. I set this value based on mouse events like onMouseEnter onMouseLeave, etc..
if (mode === "interactive") win.setIgnoreMouseEvents(false);
if (mode === "click-through") win.setIgnoreMouseEvents(true, { forward: true });
});
}
}
In this way, I can click through transparent backgrounds and when the mouse is on top of an element it will make it interactive once more.
@BryanEnid Watch out for the bug on Windows when the cursor glitches and blinks while moving it over anything that changes the cursor shape when passing the mouse events
Activity
thomasjo commentedon Mar 31, 2015
While nw.js does support it, it comes with some pretty hefty drawbacks. First of all it requires disabling GPU acceleration, and secondly it only works on OS X and Windows (based on their documentation).
CharlieHess commentedon Mar 31, 2015
+1, this one's plaguing Slack too, since we display all of our notifications in a transparent window.
YourCyborg commentedon May 6, 2015
+1, this is critical for the project I'm working on.
marcfowler commentedon May 8, 2015
+1, this would be excellent.
geelen commentedon Jun 23, 2015
Interested in hearing the latest on this. For my purposes, I'd love if we could set a transparent window to have no click area. So you could have an always-on-top full screen overlay that didn't catch clicks.
TimvdEijnden commentedon Dec 1, 2015
I'm interested too, i'm building an app with a semi transparent window that's on top of other applications but mouseevents need to get through to the other applications.
yohaia commentedon Jan 7, 2016
+1
Any news about it?
lukeapage commentedon Jan 8, 2016
the linked chromium bug is marked wont-fix
https://code.google.com/p/chromium/issues/detail?id=387234
the last comment is:
so nothing is currently going to happen until someone on the atom team decides to do it or persuades the chrome team it is worth putting on their backlog (and they said it was low priority).
molster commentedon Jan 14, 2016
Just ran into this today, It has put a -massive- issues into my plans of using a new window has an overlay. (in fact, it is now impossible)
I would love a fix for this!
devployment commentedon Mar 12, 2016
Is there any work in progress for this? Will there be a chance for the Electron team to make this possible without being added to Chromium?
stanier commentedon Apr 4, 2016
+1
Assuming this won't be resolved through the Chromium code, is there a plausible way to have the application listen for a click event and then trigger the proper counterpart in GTK or similar?
kutu commentedon Apr 4, 2016
i use ahkscript
press Win+C on active window, and its click-through now
xeoneux commentedon May 28, 2016
@zcbenz Any update on this? 😄
78 remaining items
raphael10-collab commentedon Jul 9, 2023
Following the indications found here: https://stackoverflow.com/questions/53357428/how-to-make-mouse-pass-through-window-in-electron I've put
focusable: falsefor thechild_window(the `transparent window) :Now the top
transparentwindow is not visible anymore, the buttonClick mein the underneath window is clickable and thescreen.getCursorScreenPoint()yields its outputBut, still, I'm not able to get the correct mouse position with
getCursorScreenPoint().... I mean... what I would like to do is to get, in thetransparentwindow,child_window, the position{x, y}of the mouse when clicking on the underneath windowLZQCN commentedon Jul 9, 2023
@raphael10-collab My code works for this scenario:
raphael10-collab commentedon Jul 9, 2023
Wow ...... I do not understand how you are actually using the
screen.getCursorScreenPoint's ouput:How are you passing the cursor position from the
transparentwindow to the underneath window , and viceversa, from the underneath window to thetransparentwindow? Throughelectron.ipcSend?LZQCN commentedon Jul 9, 2023
@raphael10-collab
If use my code, clicking on the transparent area of the window no longer generates any mouse events for the window. To be precise, the transparent window will be set to ignore any mouse events when the mouse is over the transparent area. only the content below the transparent window will be clicked.
Also, if you want to get the clicked position, you should get the clicked position from the window that was actually clicked.
raphael10-collab commentedon Jul 9, 2023
@LZQCN I've set :
According to what we read here: https://www.electronjs.org/docs/latest/api/browser-window#winsetignoremouseeventsignore-options :
should be fine....
Is this not enough for Linux ?

Why
xandydo not change, based on the mouse events? :raphael10-collab commentedon Jul 10, 2023
I do not understand why this message sent from the
child_window(thetransparentwindow on top of the other window) is not received in the main process:child_window renderer:React.useEffect(() => {
window.api.electronIpcSend("hello-from-app-child", "HELLOOOOOOOOO")
in
main:This is how I defined and created the bottom window (
SearchWindow) and the transparent window on top :}
foxxy432 commentedon Sep 5, 2023
It is ignored by Microsoft because of incompatibilities BUT you can use my fork: https://github.com/lnxx-kernel/electron_touch
frankz61 commentedon Nov 17, 2023
I've noticed that the Electron API setShape can solve some problems, similar to the Windows setWindowRgn. It allows areas without a set shape to be non-drawable and lets mouse events pass through.

This solved my problem. If your page's displayed content is not complex, you can use this API.
Nebula-Developer commentedon Mar 20, 2024
win.SetShape is currently only supported (experimentally) on Windows and Linux. Are there any efforts towards implementing this on macOS? (and removing it from its 'experimental' state)
tisbutanalt2 commentedon Mar 17, 2025
Referring to the workaround proposed by @LZQCN #1355 (comment) I suggest adding an additional check if the window won't have any moving elements.
Note: This is mostly useful only if your window does NOT have any moving elements.
shady-xia commentedon Apr 3, 2025
After setting
transparenton Windows, click-through functionality is enabled, but this currently does not work on Linux.My solution involves using
setShape: by monitoring DOM changes via a MutationObserver, I retrieve the dimensions of each visible element, assemble them into a rect array representing the window, and then invokesetShape.deadcoder0904 commentedon Aug 5, 2025
Would love to have this. In the meantime, this seems useful (https://github.com/loomhq/ElectronMacOSClickThrough)
Linux Support:
BryanEnid commentedon Apr 6, 2026
I found a workaround.
I have defined a global variable to toggle between "Interactive" or "click-through" in my front end. I set this value based on mouse events like onMouseEnter onMouseLeave, etc..
which is then calling on the electron side this:
In this way, I can click through transparent backgrounds and when the mouse is on top of an element it will make it interactive once more.
Eneris commentedon Jun 11, 2026
@BryanEnid Watch out for the bug on Windows when the cursor glitches and blinks while moving it over anything that changes the cursor shape when passing the mouse events