[Slime-devel] windowed applications on ms windows

Mick Charles Beaver m.charles.beaver at gmail.com
Sun Jul 6 21:03:21 UTC 2014

I finally have this issue figured out. The problem lies in an MS Windows
and GNU Emacs interaction. I debugged this further today by attaching to a
debug version of the SDL2 DLL. You could imagine my surprise when I found
that my OpenGL application was actually running as expected, but was just
not visible. Running fullscreen worked as expected.

As I tried to narrow down what was going wrong with showing the window.
This led me back to
and to this comment:

"Depending on how the lisp process was created, the first call to
#_ShowWindow in that process might ignore its argument (and instead use an
argument specified in the STARTUPINFO structure passed to
#_CreateProcess.)  SLIME under FSF Emacs runs the lisp with this flag set,
and it's possible to waste a week or two trying to track this down.  (Trust

Sure enough, CreateProcess() and ShowWindow() have that odd interaction
where the first call to ShowWindow() is ignored depending on the
STARTUPINFO passed to CreateProcess(). SERENITY NOW!!!

While there are a few different ways to solve this issue. The most
palatable to me is to just call ShowWindow() twice when running in SLIME. I
see that there is a w32-start-process-show-window variable and a way to
identify a subprocess as a GUI app. This may or may not be appropriate for
the inferior lisp process. I suspect that it would show the command prompt
window as well as the GUI window.


On Sun, Jun 8, 2014 at 10:38 AM, Luís Oliveira <luismbo at gmail.com> wrote:

> On Fri, Jun 6, 2014 at 10:47 PM, Mick Charles Beaver
> <m.charles.beaver at gmail.com> wrote:
> > I have been having trouble with a bug that seems to only occur when
> running from SLIME, as opposed to the REPL at a CMD prompt. Basically, when
> I try to run a windowed application, it will hang when opening the window.
> I do not have any idea why.
> It might have something to do with the fact that SLIME's REPL does not
> run in the initial thread. Perhaps you could try and execute your
> windowing code in the initial thread?
> HTH,
> --
> Luís Oliveira
> http://kerno.org/~luis/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20140706/c15abbe2/attachment.html>

More information about the slime-devel mailing list