|
|
5a2ea49 |
From d0a9c478604ba6a32016a631c6d0b05ac839dffe Mon Sep 17 00:00:00 2001
|
|
|
5a2ea49 |
From: Alexander Kurtakov
|
|
|
5a2ea49 |
Date: Fri, 12 Feb 2016 11:57:13 +0200
|
|
|
5a2ea49 |
Subject: Bug 487712 - Snippet128 crashes on Fedora
|
|
|
5a2ea49 |
|
|
|
5a2ea49 |
Bug in ProgressBar due to calling gdk_window_process_updates which sends
|
|
|
5a2ea49 |
expose events for redrawing purposes. But this event is implementation
|
|
|
5a2ea49 |
detail in GTK3 and shouldn't be used from outside and playing with it
|
|
|
5a2ea49 |
leads to race conditions with webkitgtk.
|
|
|
5a2ea49 |
Also GtkProgressBar redraws properly now so trying to force redraw is
|
|
|
5a2ea49 |
useless on GTK 3.
|
|
|
5a2ea49 |
|
|
|
5a2ea49 |
Change-Id: I22373b9e33c83759e0ff9dc2d0600fe39cacb91e
|
|
|
5a2ea49 |
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
|
|
|
5a2ea49 |
---
|
|
|
5a2ea49 |
.../gtk/org/eclipse/swt/widgets/ProgressBar.java | 24 ++++++++++++----------
|
|
|
5a2ea49 |
1 file changed, 13 insertions(+), 11 deletions(-)
|
|
|
5a2ea49 |
|
|
|
5a2ea49 |
diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java
|
|
|
5a2ea49 |
index d6749ef..cbdd8c7 100644
|
|
|
5a2ea49 |
--- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java
|
|
|
5a2ea49 |
+++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java
|
|
|
5a2ea49 |
@@ -1,5 +1,5 @@
|
|
|
5a2ea49 |
/*******************************************************************************
|
|
|
5a2ea49 |
- * Copyright (c) 2000, 2013 IBM Corporation and others.
|
|
|
5a2ea49 |
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
|
|
|
5a2ea49 |
* All rights reserved. This program and the accompanying materials
|
|
|
5a2ea49 |
* are made available under the terms of the Eclipse Public License v1.0
|
|
|
5a2ea49 |
* which accompanies this distribution, and is available at
|
|
|
5a2ea49 |
@@ -301,16 +301,18 @@ void updateBar (int selection, int minimum, int maximum) {
|
|
|
5a2ea49 |
|
|
|
5a2ea49 |
double fraction = minimum == maximum ? 1 : (double)(selection - minimum) / (maximum - minimum);
|
|
|
5a2ea49 |
OS.gtk_progress_bar_set_fraction (handle, fraction);
|
|
|
5a2ea49 |
- /*
|
|
|
5a2ea49 |
- * Feature in GTK. The progress bar does
|
|
|
5a2ea49 |
- * not redraw right away when a value is
|
|
|
5a2ea49 |
- * changed. This is not strictly incorrect
|
|
|
5a2ea49 |
- * but unexpected. The fix is to force all
|
|
|
5a2ea49 |
- * outstanding redraws to be delivered.
|
|
|
5a2ea49 |
- */
|
|
|
5a2ea49 |
- long /*int*/ window = paintWindow ();
|
|
|
5a2ea49 |
- OS.gdk_window_process_updates (window, false);
|
|
|
5a2ea49 |
- OS.gdk_flush ();
|
|
|
5a2ea49 |
+ if (!OS.GTK3) {
|
|
|
5a2ea49 |
+ /*
|
|
|
5a2ea49 |
+ * Feature in GTK. The progress bar does
|
|
|
5a2ea49 |
+ * not redraw right away when a value is
|
|
|
5a2ea49 |
+ * changed. This is not strictly incorrect
|
|
|
5a2ea49 |
+ * but unexpected. The fix is to force all
|
|
|
5a2ea49 |
+ * outstanding redraws to be delivered.
|
|
|
5a2ea49 |
+ */
|
|
|
5a2ea49 |
+ long /*int*/ window = paintWindow ();
|
|
|
5a2ea49 |
+ OS.gdk_window_process_updates (window, false);
|
|
|
5a2ea49 |
+ OS.gdk_flush ();
|
|
|
5a2ea49 |
+ }
|
|
|
5a2ea49 |
}
|
|
|
5a2ea49 |
|
|
|
5a2ea49 |
void gtk_orientable_set_orientation (long /*int*/ pbar, int orientation) {
|
|
|
5a2ea49 |
--
|
|
|
5a2ea49 |
cgit v0.11.2-4-g4a35
|
|
|
5a2ea49 |
|
|
|
5a2ea49 |
|