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

With multiwindow apps the overlay window disappears every time focus shifts to main window #35

Open
RobsonMi opened this issue May 4, 2023 · 6 comments
Labels
wontfix This will not be worked on

Comments

@RobsonMi
Copy link

RobsonMi commented May 4, 2023

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? ;)

@Jazcash
Copy link

Jazcash commented Aug 6, 2023

Got this issue too. Whenever my main app window loses focus, the electron overlay hides

@SnosMe
Copy link
Owner

SnosMe commented Aug 6, 2023

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.

@SnosMe
Copy link
Owner

SnosMe commented Aug 6, 2023

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 SnosMe added the wontfix This will not be worked on label Aug 6, 2023
@RobsonMi
Copy link
Author

@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...

@SnosMe
Copy link
Owner

SnosMe commented Aug 28, 2023

What did I broke? Should I teach you how to pin package version?

@RobsonMi
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants