diff options
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java index d9d7769c..a3a22070 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java @@ -60,9 +60,9 @@ public class PositioningComposite extends StateComposite { private SignaturePanel viewer = null; - private Frame frame = null; + Frame frame = null; - private Composite mainArea = null; + Composite mainArea = null; Composite bottomBar = null; @@ -179,10 +179,15 @@ public class PositioningComposite extends StateComposite { * Request focus (to enable keyboard input) */ public void requestFocus() { - this.mainArea.setFocus(); - if(!this.frame.hasFocus()) { - this.frame.requestFocusInWindow(); - } + this.getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + PositioningComposite.this.mainArea.setFocus(); + if(!PositioningComposite.this.frame.hasFocus()) { + PositioningComposite.this.frame.requestFocus(); + } + } + }); } /** |