1mNAME0m
       wm - Communicate with window manager

1mSYNOPSIS0m
       1mwm 4m22moption24m 4mwindow24m ?4margs24m?


1mDESCRIPTION0m
       The  1mwm  22mcommand  is  used to interact with window managers in order to
       control such things as the title for a window,  its  geometry,  or  the
       increments  in  terms  of  which it may be resized.  The 1mwm 22mcommand can
       take any of a number of different forms, depending on the 4moption24m  argu-
       ment.   All  of the forms expect at least one additional argument, 4mwin-0m
       4mdow24m, which must be the path name of a top-level window.

       The legal forms for the 1mwm 22mcommand are:

       1mwm aspect 4m22mwindow24m ?4mminNumer24m 4mminDenom24m 4mmaxNumer24m 4mmaxDenom24m?
              If 4mminNumer24m, 4mminDenom24m, 4mmaxNumer24m, and 4mmaxDenom24m are all specified,
              then  they  will  be passed to the window manager and the window
              manager should use them to enforce a range of acceptable  aspect
              ratios  for  4mwindow24m.   The aspect ratio of 4mwindow24m (width/length)
              will be constrained to lie between 4mminNumer24m/4mminDenom24m and  4mmaxNu-0m
              4mmer24m/4mmaxDenom24m.   If  4mminNumer24m  etc.  are  all  specified as empty
              strings,  then  any  existing  aspect  ratio  restrictions   are
              removed.   If  4mminNumer24m  etc.  are  specified,  then the command
              returns an empty string.  Otherwise, it returns a Tcl list  con-
              taining four elements, which are the current values of 4mminNumer24m,
              4mminDenom24m, 4mmaxNumer24m, and 4mmaxDenom24m (if no aspect restrictions  are
              in effect, then an empty string is returned).

       1mwm attributes 4m22mwindow0m

       1mwm attributes 4m22mwindow24m ?1moption22m?

       1mwm attributes 4m22mwindow24m ?1moption value option value...22m?
              This  subcommand  returns  or  sets platform specific attributes
              associated with a window. The first form returns a list  of  the
              platform  specific  flags  and  their  values.  The  second form
              returns the value for the specific option. The third  form  sets
              one or more of the values. The values are as follows:

              On  Windows,  1m-disabled  22mgets or sets whether the window is in a
              disabled state. 1m-toolwindow 22mgets or sets the style of the window
              to  toolwindow  (as  defined in the MSDN). 1m-topmost 22mgets or sets
              whether this is a topmost window (displays above all other  win-
              dows).    1m-alpha  22msets  the  alpha  transparency  level  of  the
              toplevel.  It accepts a value from 1m0.0  22m(fully  transparent)  to
              1m1.0  22m(opaque).   Values  outside that range will be constrained.
              This is supported on Windows 2000/XP+.  Where not supported, the
              1m-alpha 22mvalue remains at 1m1.022m.

              On  Mac  OS  X, 1m-modified 22mgets or sets the modification state of
              the window (determines whether the window close widget  contains
              the modification indicator). 1m-titlepath 22mgets or sets the path of
              the file referenced as the  window  proxy  icon  (which  can  be
              dragged  and  dropped in lieu of the file's finder icon). 1m-alpha0m
              sets the alpha transparency level of the window,  it  accepts  a
              value  from 1m0.0 22m(fully transparent) to 1m1.0 22m(opaque), values out-
              side that range will be constrained.

              On Unix, there are currently no special attribute values.

       1mwm client 4m22mwindow24m ?4mname24m?
              If 4mname24m is specified, this command stores 4mname24m (which should  be
              the  name  of the host on which the application is executing) in
              4mwindow24m's 1mWM_CLIENT_MACHINE 22mproperty for use by the  window  man-
              ager or session manager.  The command returns an empty string in
              this case.  If 4mname24m isn't specified,  the  command  returns  the
              last  name  set  in  a 1mwm client 22mcommand for 4mwindow24m.  If 4mname24m is
              specified  as  an  empty  string,  the   command   deletes   the
              1mWM_CLIENT_MACHINE 22mproperty from 4mwindow24m.

       1mwm colormapwindows 4m22mwindow24m ?4mwindowList24m?
              This command is used to manipulate the 1mWM_COLORMAP_WINDOWS 22mprop-
              erty, which provides information to the  window  managers  about
              windows that have private colormaps.  If 4mwindowList24m isn't speci-
              fied, the command returns a list whose elements are the names of
              the  windows in the 1mWM_COLORMAP_WINDOWS 22mproperty.  If 4mwindowList0m
              is specified, it consists of a list of window path  names;   the
              command  overwrites  the  1mWM_COLORMAP_WINDOWS  22mproperty with the
              given windows and returns an empty string.  The 1mWM_COLORMAP_WIN-0m
              1mDOWS  22mproperty  should  normally  contain a list of the internal
              windows within 4mwindow24m whose colormaps differ from their parents.
              The  order  of  the windows in the property indicates a priority
              order: the window manager will attempt to install as  many  col-
              ormaps  as  possible from the head of this list when 4mwindow24m gets
              the colormap focus.  If 4mwindow24m is not included among the windows
              in  4mwindowList24m,  Tk implicitly adds it at the end of the 1mWM_COL-0m
              1mORMAP_WINDOWS 22mproperty, so that its colormap is lowest in prior-
              ity.   If  1mwm  colormapwindows 22mis not invoked, Tk will automati-
              cally set the property for each  top-level  window  to  all  the
              internal windows whose colormaps differ from their parents, fol-
              lowed by the top-level itself;  the order of the  internal  win-
              dows  is undefined.  See the ICCCM documentation for more infor-
              mation on the 1mWM_COLORMAP_WINDOWS 22mproperty.

       1mwm command 4m22mwindow24m ?4mvalue24m?
              If 4mvalue24m is specified, this command  stores  4mvalue24m  in  4mwindow24m's
              1mWM_COMMAND  22mproperty  for  use  by the window manager or session
              manager and returns an empty string.   4mValue24m  must  have  proper
              list  structure;   the  elements should contain the words of the
              command used to invoke the application.  If 4mvalue24m  isn't  speci-
              fied then the command returns the last value set in a 1mwm command0m
              command for 4mwindow24m.  If 4mvalue24m is specified as an  empty  string,
              the command deletes the 1mWM_COMMAND 22mproperty from 4mwindow24m.

       1mwm deiconify 4m22mwindow0m
              Arrange  for  4mwindow24m  to  be displayed in normal (non-iconified)
              form.  This is done by mapping the window.  If  the  window  has
              never been mapped then this command will not map the window, but
              it will ensure that when the window is first mapped it  will  be
              displayed  in de-iconified form.  On Windows, a deiconified win-
              dow will also be raised and be given the focus (made the  active
              window).  Returns an empty string.

       1mwm focusmodel 4m22mwindow24m ?1mactive22m|1mpassive22m?
              If  1mactive 22mor 1mpassive 22mis supplied as an optional argument to the
              command, then it specifies the focus model for 4mwindow24m.  In  this
              case  the  command  returns  an  empty string.  If no additional
              argument is supplied, then the command returns the current focus
              model  for 4mwindow24m.  An 1mactive 22mfocus model means that 4mwindow24m will
              claim the input focus for itself or  its  descendants,  even  at
              times  when  the  focus  is currently in some other application.
              1mPassive 22mmeans that 4mwindow24m will never claim the focus for itself:
              the  window manager should give the focus to 4mwindow24m at appropri-
              ate times.  However, once the focus has been given to 4mwindow24m  or
              one  of its descendants, the application may re-assign the focus
              among 4mwindow24m's descendants.  The focus model  defaults  to  1mpas-0m
              1msive22m,  and  Tk's 1mfocus 22mcommand assumes a passive model of focus-
              ing.

       1mwm frame 4m22mwindow0m
              If 4mwindow24m has been reparented by the window manager into a deco-
              rative  frame,  the command returns the platform specific window
              identifier for the outermost frame  that  contains  4mwindow24m  (the
              window  whose  parent  is  the root or virtual root).  If 4mwindow0m
              hasn't been reparented by the window manager  then  the  command
              returns the platform specific window identifier for 4mwindow24m.

       1mwm geometry 4m22mwindow24m ?4mnewGeometry24m?
              If  4mnewGeometry24m  is  specified,  then  the geometry of 4mwindow24m is
              changed and an empty string is returned.  Otherwise the  current
              geometry  for 4mwindow24m is returned (this is the most recent geome-
              try specified either by manual resizing or in a 1mwm geometry 22mcom-
              mand).   4mNewGeometry24m has the form 1m=4m22mwidth24m1mx4m22mheight24m1m+-4m22mx24m1m+-4m22my24m, where any
              of 1m=22m, 4mwidth24m1mx4m22mheight24m, or 1m+-4m22mx24m1m+-4m22my24m may be omitted.  4mWidth24m and  4mheight0m
              are  positive integers specifying the desired dimensions of 4mwin-0m
              4mdow24m.  If 4mwindow24m is  gridded  (see  GRIDDED  GEOMETRY  MANAGEMENT
              below)  then the dimensions are specified in grid units;  other-
              wise they are specified in pixel units.  4mX24m  and  4my24m  specify  the
              desired  location  of  4mwindow24m on the screen, in pixels.  If 4mx24m is
              preceded by 1m+22m, it specifies the number  of  pixels  between  the
              left  edge  of  the screen and the left edge of 4mwindow24m's border;
              if preceded by 1m- 22mthen 4mx24m specifies the number of  pixels  between
              the right edge of the screen and the right edge of 4mwindow24m's bor-
              der.  If 4my24m is preceded by 1m+ 22mthen it specifies the number of pix-
              els  between  the top of the screen and the top of 4mwindow24m's bor-
              der;  if 4my24m is preceded by 1m- 22mthen it specifies the number of pix-
              els  between the bottom of 4mwindow24m's border and the bottom of the
              screen.  If 4mnewGeometry24m is specified as an empty string then any
              existing  user-specified  geometry  for 4mwindow24m is cancelled, and
              the window will revert to the size requested internally  by  its
              widgets.

       1mwm grid 4m22mwindow24m ?4mbaseWidth24m 4mbaseHeight24m 4mwidthInc24m 4mheightInc24m?
              This command indicates that 4mwindow24m is to be managed as a gridded
              window.  It also specifies the relationship between  grid  units
              and pixel units.  4mBaseWidth24m and 4mbaseHeight24m specify the number of
              grid units  corresponding  to  the  pixel  dimensions  requested
              internally  by  4mwindow24m  using  1mTk_GeometryRequest22m.  4mWidthInc24m and
              4mheightInc24m specify the number of pixels in  each  horizontal  and
              vertical  grid  unit.   These  four  values determine a range of
              acceptable sizes for 4mwindow24m, corresponding to grid-based  widths
              and  heights  that are non-negative integers.  Tk will pass this
              information to the window manager;  during manual resizing,  the
              window  manager  will restrict the window's size to one of these
              acceptable sizes.  Furthermore, during manual resizing the  win-
              dow  manager  will display the window's current size in terms of
              grid units rather than pixels.  If 4mbaseWidth24m etc. are all speci-
              fied  as empty strings, then 4mwindow24m will no longer be managed as
              a gridded window.  If 4mbaseWidth24m  etc.  are  specified  then  the
              return  value is an empty string.  Otherwise the return value is
              a Tcl list containing four elements corresponding to the current
              4mbaseWidth24m,  4mbaseHeight24m,  4mwidthInc24m,  and 4mheightInc24m;  if 4mwindow24m is
              not currently gridded, then an empty string is returned.   Note:
              this  command should not be needed very often, since the 1mTk_Set-0m
              1mGrid 22mlibrary procedure and the  1msetGrid  22moption  provide  easier
              access to the same functionality.

       1mwm group 4m22mwindow24m ?4mpathName24m?
              If  4mpathName24m is specified, it gives the path name for the leader
              of a group of related windows.  The window manager may use  this
              information, for example, to unmap all of the windows in a group
              when the group's leader is iconified.  4mPathName24m may be specified
              as  an empty string to remove 4mwindow24m from any group association.
              If 4mpathName24m is specified  then  the  command  returns  an  empty
              string;   otherwise it returns the path name of 4mwindow24m's current
              group leader, or an empty string if 4mwindow24m  isn't  part  of  any
              group.

       1mwm iconbitmap 4m22mwindow24m ?4mbitmap24m?
              If  4mbitmap24m  is specified, then it names a bitmap in the standard
              forms accepted by Tk (see  the  1mTk_GetBitmap  22mmanual  entry  for
              details).   This  bitmap  is  passed to the window manager to be
              displayed in 4mwindow24m's icon, and the  command  returns  an  empty
              string.   If  an  empty string is specified for 4mbitmap24m, then any
              current icon bitmap is cancelled for 4mwindow24m.  If 4mbitmap24m is spec-
              ified  then  the  command returns an empty string.  Otherwise it
              returns the name of the current icon bitmap associated with 4mwin-0m
              4mdow24m,  or  an  empty string if 4mwindow24m has no icon bitmap.  On the
              Windows operating system, an additional flag  is  supported:  1mwm0m
              1miconbitmap  4m22mwindow24m  ?1m-default22m? ?4mimage24m?.  If the 1m-default 22mflag is
              given, the icon is applied to all toplevel windows (existing and
              future)  to  which  no other specific icon has yet been applied.
              In addition to bitmap image types, a full path specification  to
              any  file  which  contains a valid Windows icon is also accepted
              (usually .ico or .icr files), or any file for  which  the  shell
              has  assigned an icon.  Tcl will first test if the file contains
              an icon, then if it has an assigned icon, and finally,  if  that
              fails, test for a bitmap.

       1mwm iconify 4m22mwindow0m
              Arrange  for  4mwindow24m to be iconified.  It 4mwindow24m hasn't yet been
              mapped for the first time, this command will arrange for  it  to
              appear in the iconified state when it is eventually mapped.

       1mwm iconmask 4m22mwindow24m ?4mbitmap24m?
              If  4mbitmap24m  is specified, then it names a bitmap in the standard
              forms accepted by Tk (see  the  1mTk_GetBitmap  22mmanual  entry  for
              details).   This  bitmap  is  passed to the window manager to be
              used as a mask in conjunction with the 1miconbitmap 22moption:  where
              the  mask  has  zeroes  no icon will be displayed;  where it has
              ones, the bits from the icon bitmap will be  displayed.   If  an
              empty  string is specified for 4mbitmap24m then any current icon mask
              is cancelled for 4mwindow24m (this is equivalent to specifying a bit-
              map  of  all  ones).   If  4mbitmap24m  is specified then the command
              returns an empty string.  Otherwise it returns the name  of  the
              current  icon mask associated with 4mwindow24m, or an empty string if
              no mask is in effect.

       1mwm iconname 4m22mwindow24m ?4mnewName24m?
              If 4mnewName24m is specified, then it is passed to  the  window  man-
              ager;  the window manager should display 4mnewName24m inside the icon
              associated with  4mwindow24m.   In  this  case  an  empty  string  is
              returned as result.  If 4mnewName24m isn't specified then the command
              returns the current icon name for 4mwindow24m, or an empty string  if
              no icon name has been specified (in this case the window manager
              will normally display the window's title, as specified with  the
              1mwm title 22mcommand).

       1mwm iconposition 4m22mwindow24m ?4mx24m 4my24m?
              If  4mx24m and 4my24m are specified, they are passed to the window manager
              as a hint about where to position the icon for 4mwindow24m.  In  this
              case  an  empty string is returned.  If 4mx24m and 4my24m are specified as
              empty strings then any existing icon position hint is cancelled.
              If  neither 4mx24m nor 4my24m is specified, then the command returns a Tcl
              list containing two values, which are the current icon  position
              hints  (if  no  hints  are  in  effect  then  an empty string is
              returned).

       1mwm iconwindow 4m22mwindow24m ?4mpathName24m?
              If 4mpathName24m is specified, it is the path name for  a  window  to
              use  as  icon for 4mwindow24m: when 4mwindow24m is iconified then 4mpathName0m
              will be mapped to serve as icon, and when 4mwindow24m is de-iconified
              then  4mpathName24m will be unmapped again.  If 4mpathName24m is specified
              as an empty string then any existing icon window association for
              4mwindow24m will be cancelled.  If the 4mpathName24m argument is specified
              then an empty string is returned.  Otherwise the command returns
              the path name of the current icon window for 4mwindow24m, or an empty
              string if there is no icon window currently specified  for  4mwin-0m
              4mdow24m.   Button press events are disabled for 4mwindow24m as long as it
              is an icon window;  this is needed in order to allow window man-
              agers  to  ``own''  those events.  Note: not all window managers
              support the notion of an icon window.

       1mwm maxsize 4m22mwindow24m ?4mwidth24m 4mheight24m?
              If 4mwidth24m and 4mheight24m are specified, they give the maximum permis-
              sible dimensions for 4mwindow24m.  For gridded windows the dimensions
              are specified in grid units;  otherwise they  are  specified  in
              pixel  units.   The  window  manager  will restrict the window's
              dimensions to be less than or equal to  4mwidth24m  and  4mheight24m.   If
              4mwidth24m  and  4mheight24m  are  specified,  then the command returns an
              empty string.  Otherwise it returns a Tcl  list  with  two  ele-
              ments,  which  are  the  maximum  width  and height currently in
              effect.  The maximum size defaults to the size  of  the  screen.
              See  the sections on geometry management below for more informa-
              tion.

       1mwm minsize 4m22mwindow24m ?4mwidth24m 4mheight24m?
              If 4mwidth24m and 4mheight24m are specified, they give the minimum permis-
              sible dimensions for 4mwindow24m.  For gridded windows the dimensions
              are specified in grid units;  otherwise they  are  specified  in
              pixel  units.   The  window  manager  will restrict the window's
              dimensions to be greater than or equal to 4mwidth24m and 4mheight24m.   If
              4mwidth24m  and  4mheight24m  are  specified,  then the command returns an
              empty string.  Otherwise it returns a Tcl  list  with  two  ele-
              ments,  which  are  the  minimum  width  and height currently in
              effect.  The minimum size defaults to one pixel in  each  dimen-
              sion.   See  the  sections on geometry management below for more
              information.

       1mwm overrideredirect 4m22mwindow24m ?4mboolean24m?
              If 4mboolean24m is specified, it must have a proper boolean form  and
              the  override-redirect flag for 4mwindow24m is set to that value.  If
              4mboolean24m is not specified then 1m1 22mor 1m0  22mis  returned  to  indicate
              whether  or  not the override-redirect flag is currently set for
              4mwindow24m.  Setting the override-redirect flag for a window  causes
              it  to  be  ignored  by the window manager;  among other things,
              this means that the window will not be reparented from the  root
              window  into a decorative frame and the user will not be able to
              manipulate the window using the  normal  window  manager  mecha-
              nisms.

       1mwm positionfrom 4m22mwindow24m ?4mwho24m?
              If  4mwho24m  is  specified, it must be either 1mprogram 22mor 1muser22m, or an
              abbreviation of one of these two.  It indicates whether 4mwindow24m's
              current  position  was  requested by the program or by the user.
              Many window managers ignore program-requested initial  positions
              and  ask  the  user to manually position the window;  if 1muser 22mis
              specified then the window manager should position the window  at
              the  given place without asking the user for assistance.  If 4mwho0m
              is specified as an  empty  string,  then  the  current  position
              source  is  cancelled.   If  4mwho24m  is specified, then the command
              returns an empty string.  Otherwise it returns 1muser  22mor  1mprogram0m
              to  indicate  the source of the window's current position, or an
              empty string if no source has been specified yet.   Most  window
              managers  interpret  ``no source'' as equivalent to 1mprogram22m.  Tk
              will automatically set the position source to  1muser  22mwhen  a  1mwm0m
              1mgeometry  22mcommand  is  invoked,  unless  the source has been set
              explicitly to 1mprogram22m.

       1mwm protocol 4m22mwindow24m ?4mname24m? ?4mcommand24m?
              This command is used to manage window manager protocols such  as
              1mWM_DELETE_WINDOW22m.   4mName24m is the name of an atom corresponding to
              a  window  manager  protocol,  such   as   1mWM_DELETE_WINDOW   22mor
              1mWM_SAVE_YOURSELF 22mor 1mWM_TAKE_FOCUS22m.  If both 4mname24m and 4mcommand24m are
              specified, then 4mcommand24m is associated with the  protocol  speci-
              fied by 4mname24m.  4mName24m will be added to 4mwindow24m's 1mWM_PROTOCOLS 22mprop-
              erty to tell the window manager that the application has a  pro-
              tocol  handler  for  4mname24m,  and  4mcommand24m  will be invoked in the
              future whenever the window manager sends a message to the client
              for  that  protocol.   In this case the command returns an empty
              string.  If 4mname24m is specified but 4mcommand24m isn't, then  the  cur-
              rent  command  for 4mname24m is returned, or an empty string if there
              is no handler defined for 4mname24m.  If 4mcommand24m is specified  as  an
              empty string then the current handler for 4mname24m is deleted and it
              is removed from the 1mWM_PROTOCOLS 22mproperty on 4mwindow24m;   an  empty
              string  is  returned.   Lastly,  if  neither 4mname24m nor 4mcommand24m is
              specified, the command returns a list of all the  protocols  for
              which handlers are currently defined for 4mwindow24m.

              Tk  always defines a protocol handler for 1mWM_DELETE_WINDOW22m, even
              if  you  haven't  asked  for  one  with  1mwm  protocol22m.    If   a
              1mWM_DELETE_WINDOW 22mmessage arrives when you haven't defined a han-
              dler, then Tk handles the message by destroying the  window  for
              which it was received.

       1mwm resizable 4m22mwindow24m ?4mwidth24m 4mheight24m?
              This  command controls whether or not the user may interactively
              resize a top-level window.  If 4mwidth24m and 4mheight24m  are  specified,
              they  are  boolean  values  that determine whether the width and
              height of 4mwindow24m may be modified by the user.  In this case  the
              command  returns an empty string.  If 4mwidth24m and 4mheight24m are omit-
              ted then the command returns a list with two 0/1  elements  that
              indicate  whether  the  width and height of 4mwindow24m are currently
              resizable.  By default, windows are  resizable  in  both  dimen-
              sions.   If resizing is disabled, then the window's size will be
              the size from the most recent interactive resize or 1mwm  geometry0m
              command.   If there has been no such operation then the window's
              natural size will be used.

       1mwm sizefrom 4m22mwindow24m ?4mwho24m?
              If 4mwho24m is specified, it must be either 1mprogram 22mor  1muser22m,  or  an
              abbreviation of one of these two.  It indicates whether 4mwindow24m's
              current size was requested by the program or by the user.   Some
              window  managers ignore program-requested sizes and ask the user
              to manually size the window;  if 1muser 22mis specified then the win-
              dow  manager  should  give the window its specified size without
              asking the user for assistance.  If 4mwho24m is specified as an empty
              string,  then  the  current size source is cancelled.  If 4mwho24m is
              specified, then the command returns an empty string.   Otherwise
              it returns 1muser 22mor 1mwindow 22mto indicate the source of the window's
              current size, or an empty string if no source has been specified
              yet.  Most window managers interpret ``no source'' as equivalent
              to 1mprogram22m.

       1mwm stackorder 4m22mwindow24m ?4misabove|isbelow24m 4mwindow24m?
              The stackorder command returns a list  of  toplevel  windows  in
              stacking  order,  from lowest to highest. When a single toplevel
              window is passed, the returned list recursively includes all  of
              the  window's  children that are toplevels. Only those toplevels
              that are currently mapped  to  the  screen  are  returned.   The
              stackorder command can also be used to determine if one toplevel
              is positioned above or below a second toplevel.  When two window
              arguments  separated  by either 4misabove24m or 4misbelow24m are passed, a
              boolean result indicates whether or not the first window is cur-
              rently above or below the second window in the stacking order.

       1mwm state 4m22mwindow24m ?newstate?
              If  4mnewstate24m  is  specified,  the  window will be set to the new
              state, otherwise it returns the current state of 4mwindow24m:  either
              1mnormal22m,  1miconic22m, 1mwithdrawn22m, 1micon22m, or (Windows only) 1mzoomed22m.  The
              difference between 1miconic 22mand 1micon 22mis that 1miconic  22mrefers  to  a
              window  that  has been iconified (e.g., with the 1mwm iconify 22mcom-
              mand) while 1micon 22mrefers to a window whose  only  purpose  is  to
              serve  as  the icon for some other window (via the 1mwm iconwindow0m
              command).  The 1micon 22mstate cannot be set.

       1mwm title 4m22mwindow24m ?4mstring24m?
              If 4mstring24m is specified, then it will be  passed  to  the  window
              manager  for  use  as  the  title for 4mwindow24m (the window manager
              should display this string in 4mwindow24m's title bar).  In this case
              the  command returns an empty string.  If 4mstring24m isn't specified
              then the command returns the current title for the 4mwindow24m.   The
              title for a window defaults to its name.

       1mwm transient 4m22mwindow24m ?4mmaster24m?
              If 4mmaster24m is specified, then the window manager is informed that
              4mwindow24m is a transient window (e.g. pull-down  menu)  working  on
              behalf  of 4mmaster24m (where 4mmaster24m is the path name for a top-level
              window).  If 4mmaster24m is specified as an empty string then  4mwindow0m
              is  marked  as not being a transient window any more.  Otherwise
              the command returns the path name of 4mwindow24m's current master, or
              an empty string if 4mwindow24m isn't currently a transient window.  A
              transient window will mirror state changes  in  the  master  and
              inherit  the state of the master when initially mapped. It is an
              error to attempt to make a window a transient of itself.

       1mwm withdraw 4m22mwindow0m
              Arranges for 4mwindow24m to  be  withdrawn  from  the  screen.   This
              causes the window to be unmapped and forgotten about by the win-
              dow manager.  If the window has never  been  mapped,  then  this
              command  causes  the window to be mapped in the withdrawn state.
              Not all window managers appear to know  how  to  handle  windows
              that  are  mapped  in  the  withdrawn state.  Note: it sometimes
              seems to be necessary to withdraw a window and  then  re-map  it
              (e.g.  with  1mwm  deiconify22m)  to  get some window managers to pay
              attention to changes in window attributes such as group.

1mGEOMETRY MANAGEMENT0m
       By default a top-level window appears on  the  screen  in  its  4mnatural0m
       4msize24m,  which is the one determined internally by its widgets and geome-
       try managers.  If the natural size of a top-level window changes,  then
       the  window's size changes to match.  A top-level window can be given a
       size other than its natural size in two  ways.   First,  the  user  can
       resize  the window manually using the facilities of the window manager,
       such as resize handles.  Second, the application can request a particu-
       lar  size  for a top-level window using the 1mwm geometry 22mcommand.  These
       two cases are handled identically by Tk;  in either case, the requested
       size overrides the natural size.  You can return the window to its nat-
       ural by invoking 1mwm geometry 22mwith an empty 4mgeometry24m string.

       Normally a top-level window can have any size from one  pixel  in  each
       dimension  up  to  the size of its screen.  However, you can use the 1mwm0m
       1mminsize 22mand 1mwm maxsize 22mcommands to limit the range of allowable  sizes.
       The  range  set  by  1mwm  minsize 22mand 1mwm maxsize 22mapplies to all forms of
       resizing, including the window's natural size as well as manual resizes
       and the 1mwm geometry 22mcommand.  You can also use the command 1mwm resizable0m
       to completely disable interactive resizing in one or both dimensions.

1mGRIDDED GEOMETRY MANAGEMENT0m
       Gridded geometry management occurs when one of the widgets of an appli-
       cation  supports a range of useful sizes.  This occurs, for example, in
       a text editor where the scrollbars, menus,  and  other  adornments  are
       fixed  in  size  but the edit widget can support any number of lines of
       text or characters per line.  In this case, it is usually desirable  to
       let the user specify the number of lines or characters-per-line, either
       with the 1mwm geometry 22mcommand or by interactively resizing  the  window.
       In the case of text, and in other interesting cases also, only discrete
       sizes of the window make sense, such as integral numbers of  lines  and
       characters-per-line;  arbitrary pixel sizes are not useful.

       Gridded  geometry management provides support for this kind of applica-
       tion.  Tk (and the window manager) assume that there is a grid of  some
       sort  within the application and that the application should be resized
       in terms of 4mgrid24m 4munits24m rather than pixels.  Gridded geometry management
       is typically invoked by turning on the 1msetGrid 22moption for a widget;  it
       can also be invoked with the 1mwm grid 22mcommand or by calling  1mTk_SetGrid22m.
       In each of these approaches the particular widget (or sometimes code in
       the application as a whole) specifies the relationship between integral
       grid  sizes  for  the window and pixel sizes.  To return to non-gridded
       geometry management, invoke 1mwm grid 22mwith empty argument strings.

       When gridded geometry management is enabled  then  all  the  dimensions
       specified  in  1mwm  minsize22m,  1mwm  maxsize22m,  and 1mwm geometry 22mcommands are
       treated as grid units rather than pixel units.  Interactive resizing is
       also carried out in even numbers of grid units rather than pixels.

1mBUGS0m
       Most existing window managers appear to have bugs that affect the oper-
       ation of the 1mwm 22mcommand.  For example, some changes won't  take  effect
       if  the window is already active:  the window will have to be withdrawn
       and de-iconified in order to make the change happen.

1mEXAMPLES0m
       A fixed-size window that says that it is fixed-size too:
              toplevel .fixed
              1mwm title     22m.fixed "Fixed-size Window"
              1mwm resizable 22m.fixed 0 0

       A simple dialog-like window, centred on the screen:
              # Create and arrange the dialog contents.
              toplevel .msg
              label  .msg.l  -text "This is a very simple dialog demo."
              button .msg.ok -text OK -default active -command {destroy .msg}
              pack .msg.ok -side bottom -fill x
              pack .msg.l  -expand 1    -fill both

              # Now set the widget up as a centred dialog.

              # But first, we need the geometry managers to finish setting
              # up the interior of the dialog, for which we need to run the
              # event loop with the widget hidden completely...
              1mwm withdraw 22m.msg
              update
              set x [expr {([winfo screenwidth .]-[winfo width .msg])/2}]
              set y [expr {([winfo screenheight .]-[winfo height .msg])/2}]
              1mwm geometry  22m.msg +$x+$y
              1mwm transient 22m.msg .
              1mwm title     22m.msg "Dialog demo"
              1mwm deiconify 22m.msg


1mSEE ALSO0m
       toplevel(n), winfo(n)


1mKEYWORDS0m
       aspect ratio, deiconify, focus  model,  geometry,  grid,  group,  icon,
       iconify,  increments,  position,  size, title, top-level window, units,
