summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--win/tkWinDialog.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 301c3de..295572e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-06 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * win/tkWinDialog.c: Use task modal for messagebox instead of
+ system modal [Bug 2484771] (ferrieux,thoyts,mjanssen)
+
2009-01-03 Donal K. Fellows <dkf@users.sf.net>
* doc/canvas.n: Improve the documentation of the -offset and
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index fd0942b..3f422f2 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinDialog.c,v 1.59 2008/12/16 23:53:14 nijtmans Exp $
+ * RCS: @(#) $Id: tkWinDialog.c,v 1.60 2009/01/06 01:26:26 patthoyts Exp $
*
*/
@@ -2151,6 +2151,9 @@ Tk_MessageBoxObjCmd(
}
}
+ while (!Tk_IsTopLevel(parent)) {
+ parent = Tk_Parent(parent);
+ }
Tk_MakeWindowExist(parent);
hWnd = Tk_GetHWND(Tk_WindowId(parent));
@@ -2180,7 +2183,7 @@ Tk_MessageBoxObjCmd(
flags = buttonFlagMap[defaultBtnIdx];
}
- flags |= icon | type | MB_SYSTEMMODAL;
+ flags |= icon | type | MB_TASKMODAL | MB_SETFOREGROUND;
tmpObj = messageObj ? Tcl_DuplicateObj(messageObj)
: Tcl_NewUnicodeObj(NULL, 0);