Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug303710_ForceActive.java')
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug303710_ForceActive.java52
1 files changed, 26 insertions, 26 deletions
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug303710_ForceActive.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug303710_ForceActive.java
index c5498b4a1e..98f0bea68e 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug303710_ForceActive.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug303710_ForceActive.java
@@ -22,31 +22,31 @@ import org.eclipse.swt.widgets.Shell;
public class Bug303710_ForceActive {
- public static void main(String[] args) {
- final Display display = new Display();
- final Shell shell = new Shell(display);
- final int time = 500;
- Runnable timer = new Runnable() {
- @Override
+ public static void main(String[] args) {
+ final Display display = new Display();
+ final Shell shell = new Shell(display);
+ final int time = 500;
+ Runnable timer = new Runnable() {
+ @Override
public void run() {
- Point point = display.getCursorLocation();
- Rectangle rect = shell.getBounds();
- if (rect.contains(point)) {
- System.out.println("In");
- } else {
- System.out.println("Out");
- }
- shell.forceActive();
- display.timerExec(time, this);
- }
- };
- display.timerExec(time, timer);
- shell.setSize(200, 200);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
+ Point point = display.getCursorLocation();
+ Rectangle rect = shell.getBounds();
+ if (rect.contains(point)) {
+ System.out.println("In");
+ } else {
+ System.out.println("Out");
+ }
+ shell.forceActive();
+ display.timerExec(time, this);
+ }
+ };
+ display.timerExec(time, timer);
+ shell.setSize(200, 200);
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch())
+ display.sleep();
+ }
+ display.dispose();
+ }
} \ No newline at end of file

Back to the top