Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2011-03-28 21:59:53 +0000
committerSilenio Quarti2011-03-28 21:59:53 +0000
commit354b0cf849e6eb35af6ec2968fb063240159ab7e (patch)
treecdccf51f0f5ded39829fc2a6877ea5922543edcd /bundles/org.eclipse.swt/Eclipse SWT WebKit
parent09457a8506cae7c732e444b39b58c0d000ec6551 (diff)
downloadeclipse.platform.swt-354b0cf849e6eb35af6ec2968fb063240159ab7e.tar.gz
eclipse.platform.swt-354b0cf849e6eb35af6ec2968fb063240159ab7e.tar.xz
eclipse.platform.swt-354b0cf849e6eb35af6ec2968fb063240159ab7e.zip
Bug 341085 - swt tests timing out linux.gtk.x86 in N20110327-2000 (TEMPORARY FIX)
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT WebKit')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java82
1 files changed, 44 insertions, 38 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
index a345c35c88..5bd447c992 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
@@ -1662,44 +1662,50 @@ int /*long*/ webkit_status_bar_text_changed (int /*long*/ web_view, int /*long*/
}
int /*long*/ webkit_web_view_ready (int /*long*/ web_view) {
- WindowEvent newEvent = new WindowEvent (browser);
- newEvent.display = browser.getDisplay ();
- newEvent.widget = browser;
-
- int /*long*/ settings = WebKitGTK.webkit_web_view_get_window_features (webView);
- int[] result = new int[1];
- OS.g_object_get (settings, WebKitGTK.locationbar_visible, result, 0);
- newEvent.addressBar = result[0] != 0;
- result[0] = 0;
- OS.g_object_get (settings, WebKitGTK.menubar_visible, result, 0);
- newEvent.menuBar = result[0] != 0;
- result[0] = 0;
- OS.g_object_get (settings, WebKitGTK.statusbar_visible, result, 0);
- newEvent.statusBar = result[0] != 0;
- result[0] = 0;
- OS.g_object_get (settings, WebKitGTK.toolbar_visible, result, 0);
- newEvent.toolBar = result[0] != 0;
- result[0] = 0;
- OS.g_object_get (settings, WebKitGTK.x, result, 0);
- int x = result[0];
- result[0] = 0;
- OS.g_object_get (settings, WebKitGTK.y, result, 0);
- int y = result[0];
- result[0] = 0;
- OS.g_object_get (settings, WebKitGTK.width, result, 0);
- int width = result[0];
- result[0] = 0;
- OS.g_object_get (settings, WebKitGTK.height, result, 0);
- int height = result[0];
- result[0] = 0;
- if (x != -1 && y != -1) {
- newEvent.location = new Point (x,y);
- }
- if (width != -1 && height != -1) {
- newEvent.size = new Point (width,height);
- }
- for (int i = 0; i < visibilityWindowListeners.length; i++) {
- visibilityWindowListeners[i].show (newEvent);
+ /* TEMPORARY CODE */
+ OS.gdk_threads_enter();
+ try {
+ WindowEvent newEvent = new WindowEvent (browser);
+ newEvent.display = browser.getDisplay ();
+ newEvent.widget = browser;
+
+ int /*long*/ settings = WebKitGTK.webkit_web_view_get_window_features (webView);
+ int[] result = new int[1];
+ OS.g_object_get (settings, WebKitGTK.locationbar_visible, result, 0);
+ newEvent.addressBar = result[0] != 0;
+ result[0] = 0;
+ OS.g_object_get (settings, WebKitGTK.menubar_visible, result, 0);
+ newEvent.menuBar = result[0] != 0;
+ result[0] = 0;
+ OS.g_object_get (settings, WebKitGTK.statusbar_visible, result, 0);
+ newEvent.statusBar = result[0] != 0;
+ result[0] = 0;
+ OS.g_object_get (settings, WebKitGTK.toolbar_visible, result, 0);
+ newEvent.toolBar = result[0] != 0;
+ result[0] = 0;
+ OS.g_object_get (settings, WebKitGTK.x, result, 0);
+ int x = result[0];
+ result[0] = 0;
+ OS.g_object_get (settings, WebKitGTK.y, result, 0);
+ int y = result[0];
+ result[0] = 0;
+ OS.g_object_get (settings, WebKitGTK.width, result, 0);
+ int width = result[0];
+ result[0] = 0;
+ OS.g_object_get (settings, WebKitGTK.height, result, 0);
+ int height = result[0];
+ result[0] = 0;
+ if (x != -1 && y != -1) {
+ newEvent.location = new Point (x,y);
+ }
+ if (width != -1 && height != -1) {
+ newEvent.size = new Point (width,height);
+ }
+ for (int i = 0; i < visibilityWindowListeners.length; i++) {
+ visibilityWindowListeners[i].show (newEvent);
+ }
+ } finally {
+ OS.gdk_threads_leave();
}
return 0;
}

Back to the top