-
Notifications
You must be signed in to change notification settings - Fork 15k
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]: NSWindow does not support nonactivating panel styleMask #35815
Comments
Instead of Once in's "shown", you may also have to use Fyi, I learned that from here: https://github.com/akiflow/electron-panel-window/blob/master/test/app/index.js#L33 I used that lib before switching to type:panel |
@johnlindquist Because of the above, my problem has been solved, perfectly! Thank you so much. |
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! |
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. |
@promise94 this solution did not work for me on version 24.3.1, can you provide a code example? In my case I have a single window which has a type 'panel' and executing only the showInactive (then focus()) but still getting this error. Actually this error is not causing any issue but the main problem is that it becomes invisible after sometimes or brings up other background app (#35483). |
I'm facing the same issue. Did you find any solution @ufukomer ? |
yes. Actually the error still remains with no harm but the issue was about using NSPanel along with some other BrowserWindow options. I removed those unnecessary BrowserWindow options then it worked like a charm. I don't remember but I can compare my BrowserWindow options with yours if you send me your BrowserWindow initialization code section. |
#35815 (comment) no longer works on Sonoma |
I hope it will get fixed soon |
whenever i use focus() to focus my window, the previous app loses its focus. However, if I click my window with my mouse, it works and previous app does not "lose its focus" (is still has no focus, but its state does not change). How do I achieve the mouse click effect with code? So that the previous app keeps its state? |
NSWindow does not support nonactivating panel styleMask 0x80 It will still be forced to focus the window by other software. |
Not working on Sonoma. Any help? |
Preflight Checklist
Electron Version
20.1.4
What operating system are you using?
macOS
Operating System Version
macOS Monterey 12.5
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
No response
Expected Behavior
When using
BrowserWindow({ type: "panel", frame: false })
, the window should appear while still keeping the previous window focused. It should appear as a non-activating panel like Spotlight or Alfred.Actual Behavior
Previous window loses focus and the following error is seen in the terminal:
Testcase Gist URL
https://gist.github.com/8e00de45bcb55d4ebbb4b597a62a75be
Additional Information
Please observe how the underlying window's cursor is still blinking and the traffic lights are enabled when activating Spotlight, vs. my Electron BrowserWindow, which blurs the underlying window. I'm showing the BrowserWindow using a global shortcut.
My.Movie.mp4
The text was updated successfully, but these errors were encountered: