summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:07:02 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:07:02 +0000
commit42f11e42caa43c29b70f03d6223c4d02259f42fc (patch)
tree0208611869b0e6e447bd4d9e492ca11ba5c393e4
parent4cd05455247417180fc6b94fc9c87b32bebc82a7 (diff)
downloadmocca-42f11e42caa43c29b70f03d6223c4d02259f42fc.tar.gz
mocca-42f11e42caa43c29b70f03d6223c4d02259f42fc.tar.bz2
mocca-42f11e42caa43c29b70f03d6223c4d02259f42fc.zip
Windows focus issues: next try
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@139 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java1
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;
}