This is a hack to enable "maximizing" frames on the left or right display
in Win32. It didn't work in Linux since device-system-metric only knows
about 'size-device, and not 'size-workspace.
Yes I know how horrible my code is, but kehoea asked for it on #xemacs,
and I'm really just posting to let people know that it's desirable and
possible feature. Maybe someone's interested enough to do it right?
(defun fake-maximize (&optional frame monitor)
"e.g. (fake-maximize terminal-frame 'right)"
(unless frame (setf frame terminal-frame))
(let* ((screen-size (device-system-metric
(frame-device terminal-frame)
'size-workspace))
(screen-width (- (car screen-size) 4))
(screen-height (- (cdr screen-size) 14)))
(cond ((equal monitor 'left) (set-frame-position
frame
(- -8 screen-width) -4))
((equal monitor 'right) (set-frame-position
frame
(+ screen-width 4) -4))
(t (set-frame-position frame 0 -4)
(decf screen-height 28)
(decf screen-width 4)))
(set-frame-pixel-size frame screen-width screen-height)))
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta