summaryrefslogtreecommitdiff
path: root/apps/csharp/life/src/life_main.cs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/csharp/life/src/life_main.cs')
-rw-r--r--apps/csharp/life/src/life_main.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/csharp/life/src/life_main.cs b/apps/csharp/life/src/life_main.cs
index 07dd43a..a7c6777 100644
--- a/apps/csharp/life/src/life_main.cs
+++ b/apps/csharp/life/src/life_main.cs
@@ -10,10 +10,11 @@ public class LifeWindow
10 lifeRender.RenderLayout((Efl.Ui.Win)sender); 10 lifeRender.RenderLayout((Efl.Ui.Win)sender);
11 } 11 }
12 12
13 void QuitEvt(object sender, EventArgs ev) 13 void QuitEvt(object sender, Efl.Gfx.EntityVisibilityChangedEvt_Args ev)
14 { 14 {
15 // quit the mainloop 15 // quit the mainloop
16 Efl.Ui.Config.Exit(); 16 if (ev.arg == false)
17 Efl.Ui.Config.Exit();
17 } 18 }
18 19
19 void TouchEvt(object sender, Efl.Input.InterfacePointerDownEvt_Args ev) 20 void TouchEvt(object sender, Efl.Input.InterfacePointerDownEvt_Args ev)
@@ -42,7 +43,7 @@ public class LifeWindow
42 win.SetAutohide(true); 43 win.SetAutohide(true);
43 44
44 // when the user clicks "close" on a window there is a request to hide 45 // when the user clicks "close" on a window there is a request to hide
45 ((Efl.Gfx.Entity)win).HideEvt += QuitEvt; 46 ((Efl.Gfx.Entity)win).VisibilityChangedEvt += QuitEvt;
46 47
47 Eina.Size2D sz; 48 Eina.Size2D sz;
48 sz.W = (int)(10 * LifeBoard.Width * win.GetScale()); 49 sz.W = (int)(10 * LifeBoard.Width * win.GetScale());
@@ -52,7 +53,7 @@ public class LifeWindow
52 lifeRender = new LifeRender(win, lifeBoard); 53 lifeRender = new LifeRender(win, lifeBoard);
53 lifeRender.Refresh(win); 54 lifeRender.Refresh(win);
54 55
55 ((Efl.Gfx.Entity)win).ResizeEvt += ResizeEvt; 56 ((Efl.Gfx.Entity)win).SizeChangedEvt += ResizeEvt;
56 ((Efl.Input.Interface)win).PointerDownEvt += TouchEvt; 57 ((Efl.Input.Interface)win).PointerDownEvt += TouchEvt;
57 ((Efl.Input.Interface)win).KeyDownEvt += KeyDownEvt; 58 ((Efl.Input.Interface)win).KeyDownEvt += KeyDownEvt;
58 59