summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2006-04-09 22:07:21 (GMT)
committerdas <das>2006-04-09 22:07:21 (GMT)
commitb606ba37692f61d3d83896881986a8bbba875484 (patch)
treec58c2b14bbb05af7f246ecee9a3a84a3b5be8907
parent291b5968272d844494e5623bab67f42839198821 (diff)
downloadtk-b606ba37692f61d3d83896881986a8bbba875484.zip
tk-b606ba37692f61d3d83896881986a8bbba875484.tar.gz
tk-b606ba37692f61d3d83896881986a8bbba875484.tar.bz2
* macosx/tkMacOSXWm.c (WmResizableCmd): propagate window attribute
changes to Carbon window manager. [FR 1467004]
-rw-r--r--ChangeLog5
-rw-r--r--macosx/tkMacOSXWm.c22
2 files changed, 21 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 8189566..771bad2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-09 Daniel Steffen <das@users.sourceforge.net>
+
+ * macosx/tkMacOSXWm.c (WmResizableCmd): propagate window attribute
+ changes to Carbon window manager. [FR 1467004]
+
2006-04-07 Daniel Steffen <das@users.sourceforge.net>
*** 8.5a4 TAGGED FOR RELEASE ***
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 3586d54..9034946 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.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: tkMacOSXWm.c,v 1.26 2006/04/07 06:15:42 das Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.c,v 1.27 2006/04/09 22:07:21 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -329,10 +329,10 @@ TkWmMapWindow(
/*
* Create the underlying Mac window for this Tk window.
*/
- macWin = (MacDrawable *) winPtr->window;
if (!TkMacOSXHostToplevelExists(winPtr)) {
TkMacOSXMakeRealWindowExist(winPtr);
}
+ macWin = (MacDrawable *) winPtr->window;
/*
* Generate configure event when we first map the window.
@@ -2458,7 +2458,7 @@ WmResizableCmd(tkwin, winPtr, interp, objc, objv)
Tcl_Obj *CONST objv[]; /* Argument objects. */
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
- int width, height;
+ int width, height, oldAttributes;
if ((objc != 3) && (objc != 5)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?width height?");
@@ -2477,6 +2477,7 @@ WmResizableCmd(tkwin, winPtr, interp, objc, objv)
|| (Tcl_GetBooleanFromObj(interp, objv[4], &height) != TCL_OK)) {
return TCL_ERROR;
}
+ oldAttributes = wmPtr->attributes;
if (width) {
wmPtr->flags &= ~WM_WIDTH_NOT_RESIZABLE;
wmPtr->attributes |= kWindowHorizontalZoomAttribute;
@@ -2491,9 +2492,6 @@ WmResizableCmd(tkwin, winPtr, interp, objc, objv)
wmPtr->flags |= WM_HEIGHT_NOT_RESIZABLE;
wmPtr->attributes &= ~kWindowVerticalZoomAttribute;
}
- /*
- * XXX: Need a ChangeWindowAttributes
- */
if (width || height) {
wmPtr->attributes |= kWindowResizableAttribute;
} else {
@@ -2505,6 +2503,18 @@ WmResizableCmd(tkwin, winPtr, interp, objc, objv)
wmPtr->scrollWinPtr->instanceData);
}
WmUpdateGeom(wmPtr, winPtr);
+ if (wmPtr->attributes != oldAttributes) {
+ if (winPtr->window == None) {
+ Tk_MakeWindowExist((Tk_Window) winPtr);
+ }
+ if (!TkMacOSXHostToplevelExists(winPtr)) {
+ TkMacOSXMakeRealWindowExist(winPtr);
+ }
+ ChangeWindowAttributes(
+ GetWindowFromPort(TkMacOSXGetDrawablePort(winPtr->window)),
+ wmPtr->attributes & (wmPtr->attributes ^ oldAttributes),
+ oldAttributes & (wmPtr->attributes ^ oldAttributes));
+ }
return TCL_OK;
}