Fix double dispatch

This commit is contained in:
Joshua Granick
2016-07-15 10:30:58 -07:00
parent 357b682fb3
commit f71119fa63
3 changed files with 12 additions and 4 deletions

View File

@@ -22,6 +22,7 @@ class NativeWindow {
public var handle:Dynamic;
private var closing:Bool;
private var parent:Window;
@@ -47,7 +48,12 @@ class NativeWindow {
public function close ():Void {
parent.onClose.dispatch ();
if (!closing) {
closing = true;
parent.onClose.dispatch ();
}
if (!parent.onClose.canceled) {
@@ -60,6 +66,10 @@ class NativeWindow {
}
} else {
closing = false;
}
}

View File

@@ -191,7 +191,7 @@ class Application extends Module {
}
window.create (this);
__windows.push (window);
//__windows.push (window);
windowByID.set (window.id, window);
window.onCreate.dispatch ();

View File

@@ -56,8 +56,6 @@ class ImageCanvasUtil {
} else {
if (image.type == DATA && buffer.__srcImageData != null && image.dirty) {
buffer.__srcContext.putImageData (buffer.__srcImageData, 0, 0);