Fix double dispatch
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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 ();
|
||||
|
||||
@@ -56,8 +56,6 @@ class ImageCanvasUtil {
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
if (image.type == DATA && buffer.__srcImageData != null && image.dirty) {
|
||||
|
||||
buffer.__srcContext.putImageData (buffer.__srcImageData, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user