diff options
author | patthoyts@users.sourceforge.net <patthoyts> | 2009-11-03 23:49:10 (GMT) |
---|---|---|
committer | patthoyts@users.sourceforge.net <patthoyts> | 2009-11-03 23:49:10 (GMT) |
commit | fe0ed6d19035542608408d284faabfaf90c02b38 (patch) | |
tree | c889179d28464c9ed345a3cbc3ffc0b2b4e6cf41 | |
parent | 1a66acfa11ead31b33fa6ccf4bb8be39d71f7a51 (diff) | |
download | tk-fe0ed6d19035542608408d284faabfaf90c02b38.zip tk-fe0ed6d19035542608408d284faabfaf90c02b38.tar.gz tk-fe0ed6d19035542608408d284faabfaf90c02b38.tar.bz2 |
[Bug 2891541] fix minimization of main window when it is grabbed.
This fixes a fault in some applications that fail to release a grab set on
the main toplevel which were prevented from minimizing on windows
following the changes for bug 1847002.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | changes | 4 | ||||
-rw-r--r-- | win/tkWinWm.c | 11 |
3 files changed, 17 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2009-11-03 Pat Thoyts <patthoyts@users.sourceforge.net> + + * win/tkWinWm.c: [Bug 2891541] Permit normal behaviour on + Windows for a grabbed toplevel when it is the main window. + 2009-11-03 Don Porter <dgp@users.sourceforge.net> *** 8.5.8 TAGGED FOR RELEASE *** @@ -2,7 +2,7 @@ This file summarizes all changes made to Tk since version 1.0 was released on March 13, 1991. Changes that aren't backward compatible are marked specially. -RCS: @(#) $Id: changes,v 1.130.2.14 2009/11/03 20:15:24 dgp Exp $ +RCS: @(#) $Id: changes,v 1.130.2.15 2009/11/03 23:49:11 patthoyts Exp $ 3/16/91 (bug fix) Modified tkWindow.c to remove Tk's Tcl commands from the interpreter when the main window is deleted (otherwise there will @@ -6670,4 +6670,6 @@ in screen distances, reducing precision loss (ferrieux) 2009-10-29 (bug fix)[1825353] Russian Windows tiny fonts problem (thoyts) +2009-11-03 (bug fix)[2891541] fix grab behaviour for main window (thoyts) + --- Released 8.5.8, November xx, 2009 --- See ChangeLog for details --- diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 2af53eb..4266663 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinWm.c,v 1.124.2.6 2009/06/02 09:41:42 patthoyts Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.124.2.7 2009/11/03 23:49:11 patthoyts Exp $ */ #include "tkWinInt.h" @@ -8031,6 +8031,10 @@ WmProc( case WM_SYSCOMMAND: /* * If there is a grab in effect then ignore the minimize command + * unless the grab is on the main window (.). This is to permit + * applications that leave a grab on . to work normally. + * All other toplevels are deemed non-minimizable when a grab is + * present. * If there is a grab in effect and this window is outside the * grab tree then ignore all system commands. [Bug 1847002] */ @@ -8038,8 +8042,11 @@ WmProc( if (winPtr) { int cmd = wParam & 0xfff0; int grab = TkGrabState(winPtr); - if (grab != TK_GRAB_NONE && SC_MINIMIZE == cmd) + if ((SC_MINIMIZE == cmd) + && (grab == TK_GRAB_IN_TREE || grab == TK_GRAB_ANCESTOR) + && (winPtr != winPtr->mainPtr->winPtr)) { goto done; + } if (grab == TK_GRAB_EXCLUDED && !(SC_MOVE == cmd || SC_SIZE == cmd)) { goto done; |