@lvce-editor/title-bar-worker 4.18.1 → 4.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3548,7 +3548,7 @@ const set = rpc => {
|
|
|
3548
3548
|
state.connected = true;
|
|
3549
3549
|
};
|
|
3550
3550
|
|
|
3551
|
-
const handleMessagePort = async (port, viewletCommandMap) => {
|
|
3551
|
+
const handleMessagePort = async (port, viewletCommandMap, setAsRendererProcess = true) => {
|
|
3552
3552
|
const executeViewletCommand = async (uid, command, ...args) => {
|
|
3553
3553
|
const fn = viewletCommandMap[`TitleBar.${command}`];
|
|
3554
3554
|
if (typeof fn !== 'function') {
|
|
@@ -3563,7 +3563,9 @@ const handleMessagePort = async (port, viewletCommandMap) => {
|
|
|
3563
3563
|
},
|
|
3564
3564
|
messagePort: port
|
|
3565
3565
|
});
|
|
3566
|
-
|
|
3566
|
+
if (setAsRendererProcess) {
|
|
3567
|
+
set(rpc);
|
|
3568
|
+
}
|
|
3567
3569
|
};
|
|
3568
3570
|
|
|
3569
3571
|
const getMenuOffset = (x, clientX, iconWidth) => {
|
|
@@ -5456,7 +5458,7 @@ const wakeUp = sleepState => {
|
|
|
5456
5458
|
set$1(sleepState.uid, sleepState, sleepState);
|
|
5457
5459
|
};
|
|
5458
5460
|
|
|
5459
|
-
const handleDirectMessagePort = port => handleMessagePort(port, commandMap);
|
|
5461
|
+
const handleDirectMessagePort = (port, setAsRendererProcess = true) => handleMessagePort(port, commandMap, setAsRendererProcess);
|
|
5460
5462
|
const commandMap = {
|
|
5461
5463
|
'TitleBar.closeMenu': wrapCommand(closeMenu),
|
|
5462
5464
|
'TitleBar.create': create,
|