code: func adjustSize(xu *xgbutil.XUtil, win xproto.Window,
  	w, h int) (int, int, error) {
  
  	// raw client geometry
  	cGeom, err := RawGeometry(xu, xproto.Drawable(win))
  	if err != nil {
  		return 0, 0, err
  	}
  
  	// geometry with decorations
  	pGeom, err := RawGeometry(xu, xproto.Drawable(win))
  	if err != nil {
  		return 0, 0, err
  	}
  
  	neww := w - (pGeom.Width() - cGeom.Width())
  	newh := h - (pGeom.Height() - cGeom.Height())
  	if neww < 1 {
  		neww = 1
  	}
  	if newh < 1 {
  		newh = 1
  	}
  	return neww, newh, nil
  }
docs: // adjustSize takes a client and dimensions, and adjust them so that they'll
  // account for window decorations. For example, if you want a window to be
  // 200 pixels wide, a window manager will typically determine that as
  // you wanting the *client* to be 200 pixels wide. The end result is that
  // the client plus decorations ends up being
  // (200 + left decor width + right decor width) pixels wide. Which is probably
  // not what you want. Therefore, transform 200 into
  // 200 - decoration window width - client window width.
  // Similarly for height.