[Linux] The first call of the "windowManager.adjustWindowGeometry()" helper fails to set the window at the correct position
Categories
(Remote Protocol :: Agent, defect, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Assigned: emilio)
References
(Blocks 2 open bugs)
Details
(Keywords: leave-open, Whiteboard: [webdriver:external])
Attachments
(3 files)
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0 ID:20260116152148
While working on bug 2011471 I noticed that browser chrome tests are failing when positioning a new browser window for the very first time on Linux. Doing it a second time it all works fine. This behavior is Linux (Ubuntu 24.04 X11) only and cannot be reproduced on other platforms.
Here a log:
0:17.34 GECKO(31307) 1769178914977 RemoteAgent TRACE Set window geometry 600x300 @ (200, 100)
0:17.65 GECKO(31307) 1769178915295 RemoteAgent TRACE Checking window geometry 1214x709 @ (40, 9)
0:17.66 GECKO(31307) 1769178915307 RemoteAgent TRACE Received DOM event MozUpdateWindowPos for [object WindowRoot]
0:17.66 GECKO(31307) 1769178915307 RemoteAgent TRACE Checking window geometry 600x300 @ (178, 88)
0:17.69 GECKO(31307) 1769178915332 RemoteAgent TRACE Received DOM event resize for [object Window]
0:17.69 GECKO(31307) 1769178915332 RemoteAgent TRACE Checking window geometry 600x300 @ (178, 88)
0:18.16 GECKO(31307) 1769178915808 RemoteAgent TRACE Final window geometry 600x300 @ (178, 88)
0:18.16 GECKO(31307) 1769178915808 RemoteAgent TRACE Set window geometry 600x300 @ (200, 100)
0:18.16 GECKO(31307) 1769178915808 RemoteAgent TRACE Checking window geometry 600x300 @ (178, 88)
0:18.17 GECKO(31307) 1769178915813 RemoteAgent TRACE Received DOM event MozUpdateWindowPos for [object WindowRoot]
0:18.17 GECKO(31307) 1769178915813 RemoteAgent TRACE Checking window geometry 600x300 @ (200, 100)
0:18.17 GECKO(31307) 1769178915813 RemoteAgent TRACE Requested window geometry matches
0:18.17 GECKO(31307) 1769178915814 RemoteAgent TRACE Final window geometry 600x300 @ (200, 100)
This also works when first only setting the size and afterward the position. It's not clear to me if maybe the window is not ready yet when we immediately trying to reposition it.
Emilio, do you have an idea?
| Reporter | ||
Comment 1•3 days ago
|
||
It can be reproduced with the patch on bug 2011471 by updating the setInitialWindowRect() method in remote/shared/test/browser/browser_WindowManager.js to only call windowManager.adjustWindowGeometry() once:
https://hg-edge.mozilla.org/try/rev/dd14d06b5c2a021d2201f66d522fa9e0746b77a9#l4.17
| Assignee | ||
Comment 2•2 days ago
|
||
This seems like an issue with how gtk deals with simultaneous move + resizes. I have a workaround though it's not amazing, because GDK does have a move_resize API but GTK doesn't...
| Assignee | ||
Comment 3•2 days ago
|
||
This prevents wrong results when doing sequential move + resizes.
Updated•2 days ago
|
| Assignee | ||
Comment 4•2 days ago
|
||
Use the same scale we use for resizes for moves as well.
| Assignee | ||
Comment 5•2 days ago
|
||
| Assignee | ||
Updated•2 days ago
|
Comment 7•1 day ago
|
||
| bugherder | ||
| Reporter | ||
Updated•21 hours ago
|
Comment 9•14 hours ago
|
||
| bugherder | ||
Description
•