Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2010-04-09 16:16:59 +0000
committerSilenio Quarti2010-04-09 16:16:59 +0000
commit47218e9fbc4646b31bfd413dd8918551c35ba16e (patch)
tree6f826450c47b4a1d1344d31ff6c5dec0cd9aa53d
parenta36c10f297fb353c0c394eb2fbc3b2c140029c36 (diff)
downloadeclipse.platform.swt-47218e9fbc4646b31bfd413dd8918551c35ba16e.tar.gz
eclipse.platform.swt-47218e9fbc4646b31bfd413dd8918551c35ba16e.tar.xz
eclipse.platform.swt-47218e9fbc4646b31bfd413dd8918551c35ba16e.zip
Bug 305991 - Hang when working remote on 64 bit system
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java
index 38453867d3..1679891975 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -120,17 +120,17 @@ void createHandle (int index) {
};
handle = OS.XmCreateScrollBar (parentHandle, null, argList, argList.length / 2);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
- if ((style & SWT.INDETERMINATE) != 0) createTimer ();
+ if ((style & SWT.INDETERMINATE) != 0) createTimer (DELAY);
}
void createWidget (int index) {
super.createWidget (index);
foreground = defaultForeground ();
}
-void createTimer () {
+void createTimer (int delay) {
int xDisplay = display.xDisplay;
int windowTimerProc = display.windowTimerProc;
int xtContext = OS.XtDisplayToApplicationContext (xDisplay);
- timerId = OS.XtAppAddTimeOut (xtContext, DELAY, windowTimerProc, handle);
+ timerId = OS.XtAppAddTimeOut (xtContext, delay, windowTimerProc, handle);
}
void destroyTimer () {
if (timerId != 0) OS.XtRemoveTimeOut (timerId);
@@ -294,7 +294,7 @@ public void setSelection (int value) {
if (selection < minimum) selection = minimum;
if (selection > maximum) selection = maximum;
setThumb(selection - minimum);
- update ();
+ if (isVisible ()) update ();
}
void setThumb (int sliderSize) {
int [] argList1 = new int [] {
@@ -324,11 +324,13 @@ void setThumb (int sliderSize) {
display.setWarnings (warnings);
}
int timerProc (int id) {
+ long time = System.currentTimeMillis();
int minimum = getMinimum ();
int range = getMaximum () - minimum + 1;
int value = getSelection () - minimum + 1;
setSelection (minimum + (value % range));
- createTimer ();
+ time = System.currentTimeMillis() - time;
+ createTimer (DELAY + (int)time);
return 0;
}
int XButtonPress (int w, int client_data, int call_data, int continue_to_dispatch) {

Back to the top