* John Paul Wallington:
> > Hm. CHECK_MSWINDOWS_FRAME looks promising. René, does
the patch
> > below work?
>
> It worked fine for a mswindows frame, I have built with tty support.
> I've now set up for building XEmacs from cvs on the new machine, and am
> using the patch.
Thanks ! Could you also test whether it doesn't crash when using a
tty frame and when called non-interactively (eg: with xemacs -batch
-eval or similar) ?
Sorry I'm so late again. It doesn't crash, but it does cause an error:
xemacs-21.4 src/xemacs -vanilla -batch -eval '(mswindows-send-sys-command
#xf030)'
Wrong type argument: console-mswindows-p, #<stream-frame "stream" 0x12c>
xemacs exiting
Same when used in tty. This can be avoided using a frame_type_p test:
if (NILP (frame))
frame = Fselected_frame (Qnil);
if (FRAME_TYPE_P (XFRAME (frame), mswindows))
{
CHECK_LIVE_FRAME (frame);
CHECK_INT (command);
PostMessage (FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), WM_SYSCOMMAND,
XINT (command), 0);
}
return Qnil;
Seems to work fine for native windows frames, X11 frames, tty and batch.
-- René