mirror of
https://github.com/godotengine/godot.git
synced 2025-10-27 03:34:17 +00:00
Move request_quit to javascript_main.
This commit is contained in:
parent
c8859f0463
commit
c610ad3739
2 changed files with 13 additions and 6 deletions
|
|
@ -1077,16 +1077,11 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
|
|||
Module.listeners['drop'] = Module.drop_handler; // Defined in native/utils.js
|
||||
canvas.addEventListener('dragover', Module.listeners['dragover'], false);
|
||||
canvas.addEventListener('drop', Module.listeners['drop'], false);
|
||||
// Quit request
|
||||
Module['request_quit'] = function() {
|
||||
send_notification(notifications[notifications.length - 1]);
|
||||
};
|
||||
},
|
||||
MainLoop::NOTIFICATION_WM_MOUSE_ENTER,
|
||||
MainLoop::NOTIFICATION_WM_MOUSE_EXIT,
|
||||
MainLoop::NOTIFICATION_WM_FOCUS_IN,
|
||||
MainLoop::NOTIFICATION_WM_FOCUS_OUT,
|
||||
MainLoop::NOTIFICATION_WM_QUIT_REQUEST
|
||||
MainLoop::NOTIFICATION_WM_FOCUS_OUT
|
||||
);
|
||||
/* clang-format on */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue