From 42f11e42caa43c29b70f03d6223c4d02259f42fc Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:07:02 +0000 Subject: Windows focus issues: next try git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@139 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../java/at/asit/pdfover/gui/composites/PositioningComposite.java | 6 ++++-- .../java/at/asit/pdfover/gui/workflow/states/PositioningState.java | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'pdf-over-gui/src') 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; } -- cgit v1.2.3