summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-07-28 08:00:39 (GMT)
committerhobbs <hobbs>2005-07-28 08:00:39 (GMT)
commit00cf5c432ebd15491be7dae391686b0a6c856248 (patch)
treeb1b77849087adc2e32f849705158444f7815ef5d /macosx/tkMacOSXWm.c
parenta8b4cdc0ae29558241512cba5e42dc3cfb5a9c59 (diff)
downloadtk-00cf5c432ebd15491be7dae391686b0a6c856248.zip
tk-00cf5c432ebd15491be7dae391686b0a6c856248.tar.gz
tk-00cf5c432ebd15491be7dae391686b0a6c856248.tar.bz2
* macosx/tkMacOSXWm.c (TkpWmSetState): add IsWindowCollapsed check
before calling CollapseWindow. (WmResizableCmd): adjust kWindow*Attributes according to resize parameters. * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent): handle inToolbarButton action (generates <<ToolbarButton>> virtual event) and correct inCollapseBox to properly track the event (waiting for buttonrelease) and generate the Unmap event (Map event on redisplay still missing).
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index cd5f4ff..ef075b5 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.7.2.10 2005/07/28 03:45:04 hobbs Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.c,v 1.7.2.11 2005/07/28 08:00:57 hobbs Exp $
*/
#include <Carbon/Carbon.h>
@@ -2330,11 +2330,11 @@ Tcl_Obj *CONST objv[]; /* Argument objects. */
static int
WmResizableCmd(tkwin, winPtr, interp, objc, objv)
-Tk_Window tkwin; /* Main window of the application. */
-TkWindow *winPtr; /* Toplevel to work with */
-Tcl_Interp *interp; /* Current interpreter. */
-int objc; /* Number of arguments. */
-Tcl_Obj *CONST objv[]; /* Argument objects. */
+ Tk_Window tkwin; /* Main window of the application. */
+ TkWindow *winPtr; /* Toplevel to work with */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int objc; /* Number of arguments. */
+ Tcl_Obj *CONST objv[]; /* Argument objects. */
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
@@ -2358,13 +2358,25 @@ Tcl_Obj *CONST objv[]; /* Argument objects. */
}
if (width) {
wmPtr->flags &= ~WM_WIDTH_NOT_RESIZABLE;
+ wmPtr->attributes |= kWindowHorizontalZoomAttribute;
} else {
wmPtr->flags |= WM_WIDTH_NOT_RESIZABLE;
+ wmPtr->attributes &= ~kWindowHorizontalZoomAttribute;
}
if (height) {
wmPtr->flags &= ~WM_HEIGHT_NOT_RESIZABLE;
+ wmPtr->attributes |= kWindowVerticalZoomAttribute;
} else {
wmPtr->flags |= WM_HEIGHT_NOT_RESIZABLE;
+ wmPtr->attributes &= ~kWindowVerticalZoomAttribute;
+ }
+ /*
+ * XXX: Need a ChangeWindowAttributes
+ */
+ if (width || height) {
+ wmPtr->attributes |= kWindowResizableAttribute;
+ } else {
+ wmPtr->attributes &= ~kWindowResizableAttribute;
}
wmPtr->flags |= WM_UPDATE_SIZE_HINTS;
if (wmPtr->scrollWinPtr != NULL) {
@@ -5325,9 +5337,9 @@ TkpWmSetState(winPtr, state)
* TODO: This approach causes flashing!
*/
- if (IsWindowCollapsable(macWin)) {
+ if (IsWindowCollapsable(macWin) && !IsWindowCollapsed(macWin)) {
ShowWindow(macWin);
- CollapseWindow( macWin, true);
+ CollapseWindow(macWin, true);
}
} else if (state == NormalState) {
Tk_MapWindow((Tk_Window) winPtr);