*** empty log message ***
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java
index 593c79e..70cc774 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java
@@ -2595,14 +2595,23 @@
*/
public void update () {
checkWidget();
- int display = OS.XtDisplay (handle);
- if (display == 0) return;
- int window = OS.XtWindow (handle);
- if (window == 0) return;
- XAnyEvent event = new XAnyEvent ();
- OS.XSync (display, false); OS.XSync (display, false);
- while (OS.XCheckWindowEvent (display, window, OS.ExposureMask, event)) {
- OS.XtDispatchEvent (event);
+ update (false);
+}
+void update (boolean all) {
+// checkWidget();
+ if (all) {
+ Display display = getDisplay ();
+ display.update ();
+ } else {
+ int display = OS.XtDisplay (handle);
+ if (display == 0) return;
+ int window = OS.XtWindow (handle);
+ if (window == 0) return;
+ XAnyEvent event = new XAnyEvent ();
+ OS.XSync (display, false); OS.XSync (display, false);
+ while (OS.XCheckWindowEvent (display, window, OS.ExposureMask, event)) {
+ OS.XtDispatchEvent (event);
+ }
}
}
int XButtonPress (int w, int client_data, int call_data, int continue_to_dispatch) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
index b5c53e8..5676cb6 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
@@ -245,7 +245,9 @@
int hwnd = parent.handle;
RECT rect = new RECT ();
rect.left = handle;
- OS.SendMessage (hwnd, OS.TVM_GETITEMRECT, 1, rect);
+ if (OS.SendMessage (hwnd, OS.TVM_GETITEMRECT, 1, rect) == 0) {
+ return new Rectangle (0, 0, 0, 0);
+ }
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
return new Rectangle (rect.left, rect.top, width, height);