Popups Appear at Wrong Position When Window Is Partially Off-Screen or Spans Screens
Categories
(Core :: Widget: Cocoa, defect, P2)
Tracking
()
People
(Reporter: haik, Unassigned)
Details
(Whiteboard: [mac:multimonitor][mac:mr1])
Attachments
(1 file)
Setup: using an external monitor configured as the main screen and to the right of the built-in laptop monitor, with the external monitor set to the maximum resolution giving it a scaling factor of 1 and the laptop screen set to the lowest resolution with a scaling factor of 2.
When positioning a Firefox window on the laptop screen so that most of a window is off the right side of the screen, right-click popups appears at the wrong place and with the wrong size.
Reproduced on Release/66 and Nightly/68.
This macos-screeninfo.py script can be used to get the scaling factor of screens:
$ macos-screeninfo.py
(main) Screen0: scale:1 at origin ( 0, 0) with size 3840 by 2160
Screen1: scale:2 at origin ( -1024, 1280) with size 1024 by 640
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
With the fix I'm working on for bug 1689682 and some tracing code I've added, I can see the popup is getting created with zero zero width and height. The widget is then resized to have incorrect values. With slightly different positioning of the window, the popup is sometimes displayed on the wrong screen. More debugging needed.
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=4 -> Create
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=4 -> Create
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=4 | Create - aParent: 0, aNativeParent: 12cbe2c00
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=4 | Create - aRect x: 0, y: 0, width: 0, height: 0
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | Create - newDesktopRect x: -165, y: 265, width: 0, height: 0
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 -> CreateNativeWindow
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | CreateNativeWindow - creating window: contentRect x: -165.000000, y: 1895.000000, width: 0.000000, height: 0.000000
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | CreateNativeWindow - backingScaleFactor: 2.000000
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | CreateNativeWindow - frame: x: -165.000000, y: 1895.000000, width: 0.000000, height: 0.000000
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 <- CreateNativeWindow
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 -> CreatePopupContentView
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 <- CreatePopupContentView
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 <- Create
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 <- Create
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 -> Resize
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | Resize - aX: -776.000000, aY: 842.000000, aWidth: 490.000000, aHeight: 556.000000
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 -> DoResize
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | DoResize - aX: -776.000000, aY: 842.000000, aWidth: 490.000000, aHeight: 556.000000, aRepaint: 1, aConstrainToCurrentScreen: 0
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | DoResize - backingScaleFactor: 2.000000
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | DoResize - unconstrained width: 980, height: 1112
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | DoResize - constrained width: 980, height: 1112
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | DoResize - newBounds: x: -776, y: 842, width: 490, height: 556
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | DoResize - newBounds fit to screen: x: -776, y: 324, width: 490, height: 556
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | DoResize - newFrame: x: -776.000000, y: 1280.000000, width: 490.000000, height: 556.000000
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 <- DoResize
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 <- Resize
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 -> Show
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | Show - backingScaleFactor: 2.000000
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | Show - frame: x: -776.000000, y: 1280.000000, width: 490.000000, height: 556.000000
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 | Show - [mWindow orderFront:nil]
[Parent 90928: Main Thread]: D/CocoaWindowLog 0x138679000 type=3 <- Show
Updated•4 years ago
|
Description
•