aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/GuiLua/GuiLua.c12
-rw-r--r--src/GuiLua/GuiLua.h1
2 files changed, 1 insertions, 12 deletions
diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c
index 3ff8f94..5c76e15 100644
--- a/src/GuiLua/GuiLua.c
+++ b/src/GuiLua/GuiLua.c
@@ -248,10 +248,7 @@ static int window(lua_State *L)
248 win = winFangAdd(parent, 25, 25, w, h, title, name); 248 win = winFangAdd(parent, 25, 25, w, h, title, name);
249 // If there's no parent, we become the parent. 249 // If there's no parent, we become the parent.
250 if (gl && !parent) 250 if (gl && !parent)
251 {
252 gl->parent = win; 251 gl->parent = win;
253 eina_clist_add_head(&gl->winFangs, &win->node);
254 }
255 lua_pushlightuserdata(L, win); 252 lua_pushlightuserdata(L, win);
256 253
257 return 1; 254 return 1;
@@ -280,7 +277,6 @@ static int quit(lua_State *L)
280 277
281static int closeWindow(lua_State *L) 278static int closeWindow(lua_State *L)
282{ 279{
283 winFang *win;
284 GuiLua *gl; 280 GuiLua *gl;
285 281
286 lua_getfield(L, LUA_REGISTRYINDEX, glName); 282 lua_getfield(L, LUA_REGISTRYINDEX, glName);
@@ -288,12 +284,7 @@ static int closeWindow(lua_State *L)
288 lua_pop(L, 1); 284 lua_pop(L, 1);
289 285
290 if (gl) 286 if (gl)
291 { 287 winFangDel(gl->parent);
292 EINA_CLIST_FOR_EACH_ENTRY(win, &gl->winFangs, winFang, node)
293 {
294 winFangDel(win);
295 }
296 }
297 288
298 return 0; 289 return 0;
299} 290}
@@ -372,7 +363,6 @@ GuiLua *GuiLuaDo(int argc, char **argv, winFang *parent)
372 363
373 result = calloc(1, sizeof(GuiLua)); 364 result = calloc(1, sizeof(GuiLua));
374 result->parent = parent; 365 result->parent = parent;
375 eina_clist_init(&result->winFangs);
376 366
377 L = luaL_newstate(); 367 L = luaL_newstate();
378 if (L) 368 if (L)
diff --git a/src/GuiLua/GuiLua.h b/src/GuiLua/GuiLua.h
index d390000..4fd1617 100644
--- a/src/GuiLua/GuiLua.h
+++ b/src/GuiLua/GuiLua.h
@@ -19,7 +19,6 @@ typedef struct _GuiLua
19{ 19{
20 lua_State *L; 20 lua_State *L;
21 winFang *parent; // Our parent window, if it exists. 21 winFang *parent; // Our parent window, if it exists.
22 Eina_Clist winFangs; // The windows we might open.
23 22
24 Eina_Clist node; 23 Eina_Clist node;
25 void *data; 24 void *data;