Bug 29693 - [GTK] DRT must display window instead of just realizing, to enable synthesizing events correctly
Summary: [GTK] DRT must display window instead of just realizing, to enable synthesizi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks: 29348
  Show dependency treegraph
 
Reported: 2009-09-23 13:53 PDT by Gustavo Noronha (kov)
Modified: 2009-09-24 07:16 PDT (History)
3 users (show)

See Also:


Attachments
show window instead of realizing only (2.68 KB, patch)
2009-09-23 14:04 PDT, Gustavo Noronha (kov)
jmalonzo: review+
gustavo: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Noronha (kov) 2009-09-23 13:53:42 PDT
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.
Comment 1 Gustavo Noronha (kov) 2009-09-23 14:04:22 PDT
Created attachment 40015 [details]
show window instead of realizing only
Comment 2 Eric Seidel (no email) 2009-09-23 17:49:47 PDT
Really?  This is so sad.  I wonder how Chromium test_shell handles this.
Comment 3 Tony Chang 2009-09-23 18:02:59 PDT
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.
Comment 4 Eric Seidel (no email) 2009-09-23 18:05:50 PDT
Interesting.  DumpRenderTree on Mac does not show a window.  I don't believe it does on Windows either.
Comment 5 Gustavo Noronha (kov) 2009-09-23 20:24:24 PDT
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 6 Jan Alonzo 2009-09-24 05:35:40 PDT
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 7 Jan Alonzo 2009-09-24 05:36:36 PDT
Comment on attachment 40015 [details]
show window instead of realizing only

r=me.
Comment 8 Gustavo Noronha (kov) 2009-09-24 07:16:15 PDT
Landed as r48721, thanks.