Fix double dispatch
This commit is contained in:
@@ -22,6 +22,7 @@ class NativeWindow {
|
|||||||
|
|
||||||
public var handle:Dynamic;
|
public var handle:Dynamic;
|
||||||
|
|
||||||
|
private var closing:Bool;
|
||||||
private var parent:Window;
|
private var parent:Window;
|
||||||
|
|
||||||
|
|
||||||
@@ -47,8 +48,13 @@ class NativeWindow {
|
|||||||
|
|
||||||
public function close ():Void {
|
public function close ():Void {
|
||||||
|
|
||||||
|
if (!closing) {
|
||||||
|
|
||||||
|
closing = true;
|
||||||
parent.onClose.dispatch ();
|
parent.onClose.dispatch ();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (!parent.onClose.canceled) {
|
if (!parent.onClose.canceled) {
|
||||||
|
|
||||||
if (handle != null) {
|
if (handle != null) {
|
||||||
@@ -60,6 +66,10 @@ class NativeWindow {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
closing = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ class Application extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.create (this);
|
window.create (this);
|
||||||
__windows.push (window);
|
//__windows.push (window);
|
||||||
windowByID.set (window.id, window);
|
windowByID.set (window.id, window);
|
||||||
|
|
||||||
window.onCreate.dispatch ();
|
window.onCreate.dispatch ();
|
||||||
|
|||||||
@@ -56,8 +56,6 @@ class ImageCanvasUtil {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (image.type == DATA && buffer.__srcImageData != null && image.dirty) {
|
if (image.type == DATA && buffer.__srcImageData != null && image.dirty) {
|
||||||
|
|
||||||
buffer.__srcContext.putImageData (buffer.__srcImageData, 0, 0);
|
buffer.__srcContext.putImageData (buffer.__srcImageData, 0, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user