Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2001-09-12 14:30:11 +0000
committerGrant Gayed2001-09-12 14:30:11 +0000
commit7da7c4c9cddc19a8aa9540f18ee3bb944be5f208 (patch)
treead481da26dd5556ad6514c4c1690e85b21330c92 /bundles
parent10e4a8636f840265f9d8a55a03f1f6b85117b9df (diff)
downloadeclipse.platform.swt-7da7c4c9cddc19a8aa9540f18ee3bb944be5f208.tar.gz
eclipse.platform.swt-7da7c4c9cddc19a8aa9540f18ee3bb944be5f208.tar.xz
eclipse.platform.swt-7da7c4c9cddc19a8aa9540f18ee3bb944be5f208.zip
eliminate Text scrollbar warnings on resize
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java
index aad8525747..1a43ec0123 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java
@@ -1088,7 +1088,18 @@ public void selectAll () {
* Sets the bounds.
*/
public void setBounds (int x, int y, int width, int height) {
+ /*
+ * Bug in Motif. For some reason an Xm warning is
+ * output whenever a Text widget's caret is beyond
+ * the visible region during a resize. The fix is
+ * to temporarily turn off warnings below.
+ */
+ Display display = getDisplay ();
+ boolean warnings = display.getWarnings ();
+ display.setWarnings (false);
super.setBounds (x, y, width, height);
+ display.setWarnings(warnings);
+
/*
* Bug in Motif. When the receiver is a Text widget
* (not a Text Field) and is resized to be smaller than
@@ -1320,7 +1331,17 @@ public void setSelection (Point selection) {
setSelection (selection.x, selection.y);
}
public void setSize (int width, int height) {
+ /*
+ * Bug in Motif. For some reason an Xm warning is
+ * output whenever a Text widget's caret is beyond
+ * the visible region during a resize. The fix is
+ * to temporarily turn off warnings below.
+ */
+ Display display = getDisplay ();
+ boolean warnings = display.getWarnings ();
+ display.setWarnings (false);
super.setSize (width, height);
+ display.setWarnings(warnings);
/*
* Bug in Motif. When the receiver is a Text widget
* (not a Text Field) and is resized to be smaller than

Back to the top