diff options
Diffstat (limited to 'pdf-over-gui/src/main')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java | 6 | ||||
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java | 1 |
2 files changed, 4 insertions, 3 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 9d96fb94..acb2eed5 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 @@ -117,10 +117,11 @@ public class PositioningComposite extends StateComposite { /** * Request focus (to enable keyboard input) */ - public void requestFocus() + private void requestFocus() { - this.setFocus(); this.frame.requestFocus(); + boolean b = setFocus(); + log.debug("Requesting focus: " + b); } /** @@ -244,6 +245,7 @@ public class PositioningComposite extends StateComposite { @Override public void doLayout() { this.layout(true, true); + requestFocus(); } /** diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java index e31990ea..9bf875fb 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java @@ -67,7 +67,6 @@ public class PositioningState extends State { param.getPlaceholderDimension().getWidth(), param.getPlaceholderDimension().getHeight(), this.stateMachine.getConfigProvider().getPlaceholderTransparency()); - this.positionComposite.requestFocus(); return this.positionComposite; } |