summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2012-08-09 09:52:14 -0400
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-08-09 09:52:14 -0400
commitd1bd88961a0efd15440afe0fe6150cc87d610695 (patch)
tree4a8c2ab8c12c231e27b174f30664731bc1e454c3
parentb5ab9fca0706738cbb566934a936be42e3684cd0 (diff)
downloadeclipse.platform.swt-d1bd88961a0efd15440afe0fe6150cc87d610695.tar.gz
eclipse.platform.swt-d1bd88961a0efd15440afe0fe6150cc87d610695.tar.xz
eclipse.platform.swt-d1bd88961a0efd15440afe0fe6150cc87d610695.zip
Bug 386274 - [OpenGL] Transparent background flicker in GLCanvas
starting 3.7.2
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.java
index f60d9c168b..e1f9b4b0b4 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.java
@@ -100,7 +100,7 @@ public class Snippet195 {
shell.setSize(640, 480);
shell.open();
- display.asyncExec(new Runnable() {
+ final Runnable run = new Runnable() {
int rot = 0;
public void run() {
if (!canvas.isDisposed()) {
@@ -123,7 +123,13 @@ public class Snippet195 {
display.asyncExec(this);
}
}
+ };
+ canvas.addListener(SWT.Paint, new Listener() {
+ public void handleEvent(Event event) {
+ run.run();
+ }
});
+ display.asyncExec(run);
while (!shell.isDisposed()) {
if (!display.readAndDispatch())