diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2009-01-06 01:26:25 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2009-01-06 01:26:25 (GMT) |
commit | bc2875abe04af3a0845c5a2cca5f4e61eb677d29 (patch) | |
tree | 26811a2fcf20516c7dd9e934cd561b8dbb19f1b7 /win/tkWinDialog.c | |
parent | c965b82f6476c99b76d9e555107cb8c27eb901e5 (diff) | |
download | tk-bc2875abe04af3a0845c5a2cca5f4e61eb677d29.zip tk-bc2875abe04af3a0845c5a2cca5f4e61eb677d29.tar.gz tk-bc2875abe04af3a0845c5a2cca5f4e61eb677d29.tar.bz2 |
Use task modal rather than system modal for messageboxes and use MB_SETFOREGROUND to get the user notification if the application is not the foreground application (flashing in the taskbar). [Bug 2484771]
Diffstat (limited to 'win/tkWinDialog.c')
-rw-r--r-- | win/tkWinDialog.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); |