Any idea to create new window in correct position in 3200x2000 with 200% scale?

hi

I have a add-on that use browser.windows.create() open a new window at specific positions. it works fine in 100% system scale. but it not works in 200% scale, like the pic below.

When calling browser.windows.create({ top: 20, left: 1900, height: 100, width: 100 }), the returned window’s left value is 500 logical pixels. Why does this occur? With a single monitor resolution of 3200×2000 (physical pixels), 200% system scaling, and 100% Firefox zoom, the expected result should be 950 logical pixels. The calculation doesn’t align.

Firefox version: 141

Any idea?

That’s rather curious. At first blush, this sounds like it may be a bug in Firefox. Could you create a bug on bugzilla.mozilla.org? If you use that link, the bug report should automatically have the correct product and component set.

Mozilla has some guidance on how to write a good bug report, but one of the most helpful things you can do to help the engineer that investigates the issue understand and fix the issue is to include a minimal reproduction example.