summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2011-08-03 16:50:56 (GMT)
committerdgp <dgp@noemail.net>2011-08-03 16:50:56 (GMT)
commitde68e5d92d5897f3c892d4a9f5d1209768320243 (patch)
treef459a9325419821602afa07edcf31d9edd44254e /win
parentee99e616cb4d85c8cb2f05848451f9668798f7d0 (diff)
parent2d0c4df12c9ef7dc51a80fc6b7dda664de98d87e (diff)
downloadtk-de68e5d92d5897f3c892d4a9f5d1209768320243.zip
tk-de68e5d92d5897f3c892d4a9f5d1209768320243.tar.gz
tk-de68e5d92d5897f3c892d4a9f5d1209768320243.tar.bz2
merge to rc
FossilOrigin-Name: c35a1141691495265c0bdd56db681de58234e63b
Diffstat (limited to 'win')
-rw-r--r--win/tkWinDialog.c2
-rw-r--r--win/tkWinWm.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 5f54789..06372be 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -719,7 +719,7 @@ GetFileName(
ofn.lpstrFile = (WCHAR *) file;
ofn.nMaxFile = TK_MULTI_MAX_PATH;
ofn.Flags = OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_NOCHANGEDIR
- | OFN_EXPLORER | OFN_ENABLEHOOK;
+ | OFN_EXPLORER | OFN_ENABLEHOOK| OFN_ENABLESIZING;
ofn.lpfnHook = (LPOFNHOOKPROC) OFNHookProc;
ofn.lCustData = (LPARAM) &ofnData;
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 859aa52..53f8ee6 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -7939,6 +7939,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]
*/
@@ -7946,8 +7950,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;