From 4ad8e29364ba0074b1041c5ae19453a9a6f398d2 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 16 May 2014 19:01:10 +1000 Subject: Only open one purkle window. --- src/purkle/purkle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/purkle/purkle.c b/src/purkle/purkle.c index 6c211c0..3ad776b 100644 --- a/src/purkle/purkle.c +++ b/src/purkle/purkle.c @@ -7,6 +7,7 @@ static const char *ourName = "purkle"; static int skang, _M; static Widget *entry, *history; +static winFang *me; static winFang *purkleAdd(winFang *parent, int w, int h, EPhysics_World *world) { @@ -78,7 +79,7 @@ int luaopen_purkle(lua_State *L) world = gl->world; } - purkleAdd(parent, 500, 420, world); + if (!me) me = purkleAdd(parent, 500, 420, world); push_lua(L, "@ ( = )", skang, MODULEEND, _M, 0); // Return _M, the table itself, not the index. -- cgit v1.1