summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
diff options
context:
space:
mode:
authorSteve Northover <steve>2004-03-02 20:56:39 +0000
committerSteve Northover <steve>2004-03-02 20:56:39 +0000
commit07f034a353c9ee532abe7fa95cef8c509291595d (patch)
treebf2168f274d4b116437473bf30b07fe5e78b7370 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
parent4cda2906245932c3af06926d23230e8786beff56 (diff)
downloadeclipse.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-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java18
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);