diff options
author | Minteck <contact@minteck.org> | 2022-07-07 11:06:12 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-07-07 11:06:12 +0200 |
commit | 3e064be8020ed1eccc5cddcac5ab355320ebccb5 (patch) | |
tree | 37ca0fa0141b5600955ce5d001a4c7a7745902a0 /Library/SDK/Entrypoint.js | |
parent | 0e9f2dc57e9df8fbc5a5da6d68d1268278aa4129 (diff) | |
download | strawberry-os-mane.tar.gz strawberry-os-mane.tar.bz2 strawberry-os-mane.zip |
Diffstat (limited to 'Library/SDK/Entrypoint.js')
-rw-r--r-- | Library/SDK/Entrypoint.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Library/SDK/Entrypoint.js b/Library/SDK/Entrypoint.js index d55d823..9d7e4a2 100644 --- a/Library/SDK/Entrypoint.js +++ b/Library/SDK/Entrypoint.js @@ -13,10 +13,6 @@ readline.emitKeypressEvents(process.stdin); Launcher = require("../Launcher"); process.stdin.on('keypress', (str, key) => { - for (let func of Strawberry.KeyboardEvents) { - func(key.sequence); - } - if (key.sequence === '\u0003') { require('show-terminal-cursor')(); process.exit(); @@ -24,6 +20,10 @@ process.stdin.on('keypress', (str, key) => { if (!Strawberry.ProcessKeyboard) return; + for (let func of Strawberry.KeyboardEvents) { + func(key.sequence); + } + if (!global._STRAWBERRY_APPMENU_OPEN) { try { Strawberry.MenuBar.Reset(); @@ -362,6 +362,8 @@ global._STRAWBERRY_INIT_APP = () => { ProcessKeyboard: true, WhenLoaded: () => {}, StartLoad: (skipCoolLoading) => { + global._STRAWBERRY_CURRENT_APP = Strawberry.App; + load("Strawberry.Audio"); if (!skipCoolLoading) skipCoolLoading = false; @@ -433,7 +435,7 @@ global._STRAWBERRY_INIT_APP = () => { global._STRAWBERRY_INIT_APP(); global.load = (module) => { - if (require('os').platform() === "linux" && module === "Strawberry.Menubar") { + if (module === "Strawberry.Menubar") { module = "Strawberry.MenuBar"; } @@ -451,11 +453,7 @@ global.load = (module) => { Strawberry[parts[1]] = require("./Modules/" + module); } - if (module === "Strawberry.Menubar") { - load("Strawberry.MenuBar"); - } - - if (require('os').platform() === "linux" && module === "Strawberry.MenuBar") { + if (module === "Strawberry.MenuBar") { Strawberry.Menubar = Strawberry.MenuBar; } }
\ No newline at end of file |