diff options
author | Steve Northover <steve> | 2004-03-02 20:56:39 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2004-03-02 20:56:39 +0000 |
commit | 07f034a353c9ee532abe7fa95cef8c509291595d (patch) | |
tree | bf2168f274d4b116437473bf30b07fe5e78b7370 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java | |
parent | 4cda2906245932c3af06926d23230e8786beff56 (diff) | |
download | eclipse.platform.swt-07f034a353c9ee532abe7fa95cef8c509291595d.tar.gz eclipse.platform.swt-07f034a353c9ee532abe7fa95cef8c509291595d.tar.xz eclipse.platform.swt-07f034a353c9ee532abe7fa95cef8c509291595d.zip |
53014
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java index 810b72e90e..8af80fd7f3 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java @@ -161,7 +161,25 @@ public FontData open () { int blue = (rgb.blue << 16) & 0xFF0000; lpcf.rgbColors = red | green | blue; } + + /* Make the parent shell be temporary modal */ + Shell oldModal = null; + Display display = null; + if ((style & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) { + display = parent.getDisplay (); + oldModal = display.getModalDialogShell (); + display.setModalDialogShell (parent); + } + + /* Open the dialog */ boolean success = OS.ChooseFont (lpcf); + + /* Clear the temporary dialog modal parent */ + if ((style & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) { + display.setModalDialogShell (oldModal); + } + + /* Compute the result */ if (success) { LOGFONT logFont = OS.IsUnicode ? (LOGFONT) new LOGFONTW () : new LOGFONTA (); OS.MoveMemory (logFont, lpLogFont, LOGFONT.sizeof); |