To correctly synthesize events using gtk_main_do_event we need the window to be shown, or GTK+ throws the events away. We want this for our EventSender. See https://bugs.webkit.org/show_bug.cgi?id=29348.
Created attachment 40015 [details] show window instead of realizing only
Really? This is so sad. I wonder how Chromium test_shell handles this.
test_shell on all platforms shows the window. On Linux, we run our tests in a virtual X server (Xvfb) so it doesn't really matter.
Interesting. DumpRenderTree on Mac does not show a window. I don't believe it does on Windows either.
Yeah, that's a limitation in GTK+ - it explicitely checks if the window is visible to decide whether it will propagate the event or not, so to synthesize the events with maximum fidelity, that is, not only emitting signals, but causing GTK+ to do whatever it always does when the event happens, we'll need to show the window. Most people will run the tests inside Xvfb, so it should be a non-issue, as Tony pointed out.
Comment on attachment 40015 [details] show window instead of realizing only > + gtk_window_resize(GTK_WINDOW(window), size.width, size.height); > gtk_widget_size_allocate(container, &size); Is this part of the patch?
Comment on attachment 40015 [details] show window instead of realizing only r=me.
Landed as r48721, thanks.