Open Bug 1554229 Opened 6 years ago Updated 2 months ago

Opening window on non-Retina screen shows it double scaled

Categories

(Core :: Widget: Cocoa, defect)

67 Branch
Desktop
macOS
defect

Tracking

()

Tracking Status
firefox-esr78 --- affected
firefox86 --- affected
firefox87 --- affected
firefox88 --- affected

People

(Reporter: michael.perrin84, Assigned: jaas, NeedInfo)

Details

(Whiteboard: [mac:multimonitor])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

  1. Plug a Retina MacBook to a non-Retina external screen.
  2. Open a Firefox instance on MacOS (10.14.4 version) on the Retina screen
  3. Click on a link that will open a popup on the external screen (example: "Play" icon on https://javascript.info/popup-windows#example-a-minimalistic-window )

Actual results:

The popup opens on the external screen, but has a double scale (like a 200% zoom), which is very annoying.
See the double scaled "Disqus login" window on the attached screenshot.

Expected results:

The popup should open on the external screen, but scaled correctly.

Hi Michael Perrin!

We tried to test this issue but we don't have the environment to proceed further. I will add a component to this bug and maybe someone from dev's team could give us a hand. Thanks for your contribution.

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core

Thanks Marclea for considering this issue!
If you need any further details, I am here to help (I can't do much on the programming side as I am more a web developer, sorry about it).

Just one more detail: when I wrote a "Retina MacBook" it can be any Retina screen Apple computer. I am using a MacBook Pro, not a "MacBook".

The priority flag is not set for this bug.
:spohl, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(spohl.mozilla.bugs)
Flags: needinfo?(spohl.mozilla.bugs)
Priority: -- → P3
Severity: normal → S3
Whiteboard: [mac:multimonitor]

Hi Michael!
I'm trying to reproduce old bugs to see if we can resolve some. I'm unable to reproduce this issue on latest Nightly version 87.0a1 (2021-02-22)(64-bit) on macOS 10.14 with an external screen.
Could you please try in latest Nightly and tell us if the problem still happens? You can download it from here: https://nightly.mozilla.org/
Thanks!

Flags: needinfo?(michael)
Flags: needinfo?(michael)

(In reply to Marcela from comment #5)

Hi Michael!
I'm trying to reproduce old bugs to see if we can resolve some. I'm unable to reproduce this issue on latest Nightly version 87.0a1 (2021-02-22)(64-bit) on macOS 10.14 with an external screen.
Could you please try in latest Nightly and tell us if the problem still happens? You can download it from here: https://nightly.mozilla.org/
Thanks!

Hi Marcela!

Thanks for looking at this.
I just tried on Firefox Nightly, and I could not arrange windows so that a popup opens on the other screen, in order to reproduce the issue.

I would not be surprised the issue is still there, as there is an other way to see this kind of issue, and I could reproduce this one on Nightly:

  1. Set up your screens so that the Retina screen is on the left, and your non-Retina one on the right.
  2. Go the Views menu and choose Toolbars › Bookmarks Toolbar › Always Show
  3. Create some folders in the Bookmarks toolbar, so that you get a folder at the right edge of the toolbar.
  4. Add a bookmark to that folder.
  5. Place the Firefox window (non maximized) at the right of your Retina screen (which is your left screen).
  6. Click the folder in the Bookmarks Toolbar

Result:

The bookmark menu item is shown on the non-Retina screen in double size (See attached screenshot - https://bugzilla.mozilla.org/attachment.cgi?id=9204684)

Thanks for the updates. Due to you are not able to reproduce it on Nightly and I am not able to reproduce it following the new steps, I will close this as resolved WFM, please feel free to reopen it in case you are able to reproduce the issue.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---

Hi Marcela,

I finally found a way to reproduce it and reopened it.

Open https://jsfiddle.net/tm3qujhr/ on the left screen (Retina) and have a non-Retina one positioned to the right.
Click on "Try it" button. That will open the window on the right screen, with double size.
Do not hesitate to play with the "left" parameter value in the code to choose where to display the popup window.

Hi Michael, Thank you for the reduced case, I was able to reproduce this issue In Release, Beta, ESR 78.8.0 as well as our latest Nightly build 88.0a1 (2021-02-23), I will update the flags for it.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → macOS
Hardware: Unspecified → Desktop
Assignee: nobody → haftandilian
Priority: P3 → P1

Hi Rares, could you check if this is still reproducible on the latest Nightly? Now that bug 1689682 is fixed, this may have been fixed too, but I can't reproduce it (using earlier builds.)

If it is still reproducible for you, could you include the output from macos-screeninfo.py?

Flags: needinfo?(rares.doghi)

Hi, This issue still occurs in our latest Nightly build 89.0a1 (2021-03-28)

Here is the output from the py file:
(main) Screen0: scale:2 at origin ( 0, 0) with size 1440 by 900
Screen1: scale:1 at origin ( 1440, -84) with size 1920 by 1080

Please let me know if you need any more information.

Flags: needinfo?(rares.doghi) → needinfo?(haftandilian)

(In reply to Michael Perrin from comment #9)

Open https://jsfiddle.net/tm3qujhr/ on the left screen (Retina) and have a non-Retina one positioned to the right.
Click on "Try it" button. That will open the window on the right screen, with double size.


(In reply to Rares Doghi from comment #12)
> (main) Screen0: scale:2 at origin (     0,      0) with size  1440 by   900
> Screen1: scale:1 at origin (  1440,    -84) with size  1920 by  1080

If Firefox conflates device pixels with desktop pixels, it will think that the main screen "overlaps" with the large portion of the second screen.

I think here is the source of miscalculation:
https://searchfox.org/mozilla-central/rev/74d0efd1107a26f178b108b6a18a179e9b06547c/toolkit/components/windowwatcher/nsWindowWatcher.cpp#2308-2315
`ScreenForRect` takes desktop pixels while `scale` is a device-pixels-to-css-pixels scale.

Jonathan, any thoughts?
Flags: needinfo?(jfkthame)
Flags: needinfo?(haftandilian)
Priority: P1 → P2
Flags: needinfo?(haftandilian)
Flags: needinfo?(haftandilian)
Assignee: haftandilian → nobody
Priority: P2 → --
Assignee: nobody → jaas

I set up a second monitor to test this but I could not reproduce using the jsfiddle test case. I'm using a Retina display as my primary, then a second ASUS monitor positioned to the right of the Retina screen as the reporter noted. I tried with the second monitor being higher and lower resolutions than the retina, still could not reproduce.

It has been a while, but would be great to know if Michael or Rares can reproduce this with the latest release Firefox (148).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: