diff options
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r-- | win/tkWinWm.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 4118b17..6eddb59 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.112 2007/01/11 15:35:41 dkf Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.113 2007/01/12 10:41:23 dkf Exp $ */ #include "tkWinInt.h" @@ -2600,6 +2600,8 @@ TkpWmSetState( cmd = SW_SHOWNOACTIVATE; } else if (state == ZoomState) { cmd = SW_SHOWMAXIMIZED; + } else { + return; } ShowWindow(wmPtr->wrapper, cmd); @@ -3146,7 +3148,7 @@ WmAttributesCmd( Tcl_Obj *CONST objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; - LONG style, exStyle, styleBit, *stylePtr; + LONG style, exStyle, styleBit, *stylePtr = NULL; char *string; int i, boolean, length; int config_fullscreen = 0; @@ -5209,8 +5211,9 @@ WmStateCmd( } if (winPtr->flags & TK_EMBEDDED) { - int state; - switch(index) { + int state = 0; + + switch (index) { case OPT_NORMAL: state = NormalState; break; @@ -5223,9 +5226,11 @@ WmStateCmd( case OPT_ZOOMED: state = ZoomState; break; + default: + Tcl_Panic("unexpected index"); } - if(state+1 != SendMessage(wmPtr->wrapper, TK_STATE, state, 0)) { + if (state+1 != SendMessage(wmPtr->wrapper, TK_STATE, state, 0)) { Tcl_AppendResult(interp, "can't change state of ", winPtr->pathName, ": the container does not support the request", NULL); @@ -7020,6 +7025,7 @@ ConfigureTopLevel( state = IconicState; break; case SW_SHOWNORMAL: + default: state = NormalState; break; } |