Open Bug 1700780 Opened 4 years ago Updated 4 years ago

Spurious "resize" events when resizing a window on Ubuntu

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

People

(Reporter: mak, Unassigned)

References

Details

I found this problem while investigating an intermittent TV failure in Bug 1691454.
The test opens a window, then resizes it using resizeTo, then, using BrowserTestUTils.is_visible() it checks whether certain elements are visible.
Those elements visibility is set by a media query: when the window is smaller than a certain size, we collapse them.

The test is failing intermittently in Ubuntu 18 TV (also Ubuntu 20 in my local VM).
When it fails waitForEvent prints "Got resize event (innerWidth: 500)" so the innerWidth is "apparently" correct.

I asked Emilio whether it was a known problem with GTK/X, he suggested to add a permanent event listener to check whether I was getting multiple resize events, and indeed it catched this:
0:06.68 INFO resize 500
0:06.71 INFO resize 1280
0:06.75 INFO resize 500

There is an unexpected resize 1280 event, and if my test checks visibility just after it, it fails.
I'm now adding a workaround to browser_PageActions_overflow.js that waits to not receive resize events for 100ms before proceeding.

See Also: → 1691454
Component: DOM: Events → Layout

Though layout component is just the place where resize is dispatched, but perhaps the issue in widget level if that gives odd sizes. Or it could be an issue in gtk?

afaict, it only happened on Linux.

Component: Layout → Widget: Gtk
You need to log in before you can comment on or make changes to this bug.