(defun push (dx dy)
  (move-window (+ window-x dx) (+ window-y dy)))

(defun pushleft ()
  (push (- pushby) 0))

(defun pushright ()
  (push pushby 0))

(defun pushup ()
  (push 0 (- pushby)))

(defun pushdown ()
  (push 0 pushby))

(defun uwm.iconify-window ()
  (if (eq window-status 'window)
      (progn
	(if (not (window-icon?))
	    (with (window (window-icon) pos (current-mouse-position) x 0 y 0)
		  (setq x (- (# 0 pos) (/ window-width 2)))
		  (setq y (- (# 1 pos) (/ window-height 2)))
		  (move-window x y)))))
  (iconify-window))

(defun uwm.new-iconify-window ()
  (cond ((eq window-status 'window)
	 (setq uwm.new-window window-icon))
	((eq window-status 'icon)
	 (setq uwm.new-window window-window))
	(t 
	 (setq uwm.new-window nil)))
  (if uwm.new-window
    (progn
      (with (window uwm.new-window pos (current-mouse-position) x 0 y 0)
	    (setq x (- (# 0 pos) (/ window-width 2)))
	    (setq y (- (# 1 pos) (/ window-height 2)))
	    (move-window x y)
	    (move-window))
      (iconify-window))))

