electron-overlay-window
electron-overlay-window copied to clipboard
With multiwindow apps the overlay window disappears every time focus shifts to main window
Hi! I have just updated from some old version (from May 2022 I think) to the latest and all of a sudden overlay window is hidden when focus shifts to any other window. Why is that?
I see this was added in 1c3443d but without any comment or explanation. This change basically makes overlay useless in most cases.
I can easily fix this by adding an option for permanent overlay if You would accept my pull request later? ;)
Got this issue too. Whenever my main app window loses focus, the electron overlay hides
I see this was added in 1c3443d but without any comment or explanation.
It was changed because Mac unlike win and x11, can't make other process window to be a child of another process. So instead win and x11 were rewritten to show always on top.
I can easily fix this by adding an option for permanent overlay
If you do just this, overlay will also be on top of whatever app you open later. The more correct fix is to remove always on top flag, when the window loses focus. And only hide overlay when the window minimizes.
AFAIK i experimented with removing the flag, but I recieve event about lost focus too late, so its z-order still endup greater, and OS doesn't have an API to reorder them.
@SnosMe Hi! Isn't this a little naive to break a fundamental functionality of this module due to Mac limitation? Wouldn't it be more wise to create a workaround just for the Mac than to basically brake whole overlay experience for Win and X11 users? Can't use current version as it's basically useless right now which is very sad to see...
What did I broke? Should I teach you how to pin package version?
Oh, I did pin the version. It just doesn't sound like a good practice to break 2 platform in the name of 1. On windows this module did work great and any development would be very welcome. After this change it's no longer working as described.