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
{{ message }}
Repository navigation
[Bug]: BrowserWindow.getPosition() returns [0, 0] on Wayland #40886
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
Reproduced with:
28.1.1
29.0.0-alpha.6
38.3.0
39.0.0-beta.3
What operating system are you using?
Other Linux
Operating System Version
Arch Linux with Sway WM (Wayland)
What arch are you using?
x64
Last Known Working Electron version
n/a
Expected Behavior
The BrowserWindow.getPosition() should return the window position on any OS.
Actual Behavior
When starting the application with Wayland support (with Electron 28, you need --ozone-platform-hint=auto --enable-features="WaylandWindowDecorations", with Electron 38 Wayland is used by default), the position returned is always [0, 0].
I tend to agree with the notion that the application should not have to deal with window positioning, restoring the window position after re-starting the application should be the job of the window manager or desktop environment. However, on most platforms it actually needs to be handled by the client.
From a developer point of view, in case it really isn't possible to get access to the coordinates, could we instead get some kind of flag that indicates that position cannot be determined, instead of returning the (potentially valid) position [0, 0]?
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 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 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 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!
Activity
threema-danilo commentedon Jan 4, 2024
Hmm, this might be tricky: w3c/window-management#68
I tend to agree with the notion that the application should not have to deal with window positioning, restoring the window position after re-starting the application should be the job of the window manager or desktop environment. However, on most platforms it actually needs to be handled by the client.
From a developer point of view, in case it really isn't possible to get access to the coordinates, could we instead get some kind of flag that indicates that position cannot be determined, instead of returning the (potentially valid) position
[0, 0]?electron-issue-triage commentedon Apr 4, 2024
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!
threema-danilo commentedon Apr 4, 2024
This is still an issue.
electron-issue-triage commentedon Jul 4, 2024
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!
17 remaining items
electron-issue-triage commentedon Oct 16, 2025
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!
threema-danilo commentedon Oct 16, 2025
Still an issue. I updated the issue description and the reproducer, now that we're 10 Electron versions into the future.
Could someone from the Electron team (@codebytere?) re-tag the issue? This is not just an 28-x-y thing. Thanks! 🙏🏻
Also, is there a way to disable the auto-stale bot for this issue?
🤖 feat: persist window position and size across restarts
🤖 feat: persist window position and size across restarts
🤖 feat: persist window position and size across restarts
🤖 feat: persist window position and size across restarts
🤖 feat: persist window position and size across restarts (#872)
electron-issue-triage commentedon Jan 15, 2026
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!
donnybeelo commentedon Jan 18, 2026
Still an issue.