Skip to content

[hlsdl] Quit event is ignored #1293

@tobil4sk

Description

@tobil4sk

The Quit event is currently ignored with hlsdl:

heaps/hxd/Window.hl.hx

Lines 560 to 563 in 5b4d8cd

#if !hlsdl // hlsdl post both Close+Quit
case Quit:
return onCloseEvent();
#end

This is a problem on Android, because closing an app on android does not lead to Close, only Quit, which is ignored and leads to the app failing to terminate:

I ActivityTaskManager: Destroy timeout of remove-task, attempt to kill Task{1567ba5 #2283 type=standard A=10178:io.heaps.android}
I ActivityManager: Killing 1929:io.heaps.android/u0a178 (adj 905): remove task
I WindowManager: WIN DEATH: Window{b4425df u0 io.heaps.android/io.heaps.android.HeapsActivity}
W InputManager-JNI: Input channel object 'b4425df io.heaps.android/io.heaps.android.HeapsActivity (client)' was disposed without first being removed with the input manager!

Reopening it very quickly before android decides to kill it leads to the app being in a broken state, where the display has been shut down but the main loop is still running.

On desktop (linux), ignoring Quit events also means that pressing Ctrl-C on the terminal where the app is running also has no effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions