Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemy Suen2010-11-28 21:35:42 +0000
committerMatthias Sohn2010-11-28 21:35:42 +0000
commitba56481ef9cd0cb2b10213709453ab39ea04370c (patch)
treec86e7ff4b02527ecd398da0a0347365c03fb1cc7
parenta3c5194a9d77c190954d11a28fed40e2474f6ef9 (diff)
downloadegit-ba56481ef9cd0cb2b10213709453ab39ea04370c.tar.gz
egit-ba56481ef9cd0cb2b10213709453ab39ea04370c.tar.xz
egit-ba56481ef9cd0cb2b10213709453ab39ea04370c.zip
Fix window focus after closing preferences dialog of commit dialog
No shells were being passed to the preference dialog when it was opened from the commit dialog so SWT is forced to choose a shell to reactivate after the preferences dialog is closed. The chosen shell becomes the workbench window's shell when the focus should instead be granted back to the focus dialog. By passing the commit dialog's shell to the preference dialog, we maintain this hierarchy and the focus is given back to the commit dialog after the preferences dialog has been closed. Change-Id: I4ad646363b13d2134e99d39d9d54a5dae843d8bd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java
index ceaffa5a81..5826e0f6ca 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitDialog.java
@@ -254,7 +254,7 @@ public class CommitDialog extends Dialog {
public void widgetSelected(SelectionEvent e) {
String preferencePageId = "org.eclipse.egit.ui.internal.preferences.CommitDialogPreferencePage"; //$NON-NLS-1$
PreferenceDialog dialog = PreferencesUtil
- .createPreferenceDialogOn(null, preferencePageId,
+ .createPreferenceDialogOn(getShell(), preferencePageId,
new String[] { preferencePageId }, null);
dialog.open();
commitText.reconfigure();

Back to the top