mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
move fg/active checks to window focus() instead of tab focus (#1248)
This commit is contained in:
parent
7718aebc17
commit
8685ca9069
@ -7,13 +7,7 @@ import { debounce } from "throttle-debounce";
|
|||||||
import { ClientService, FileService, ObjectService, WindowService } from "../frontend/app/store/services";
|
import { ClientService, FileService, ObjectService, WindowService } from "../frontend/app/store/services";
|
||||||
import * as keyutil from "../frontend/util/keyutil";
|
import * as keyutil from "../frontend/util/keyutil";
|
||||||
import { configureAuthKeyRequestInjection } from "./authkey";
|
import { configureAuthKeyRequestInjection } from "./authkey";
|
||||||
import {
|
import { getGlobalIsQuitting, getGlobalIsRelaunching, setWasActive, setWasInFg } from "./emain-activity";
|
||||||
getGlobalIsQuitting,
|
|
||||||
getGlobalIsRelaunching,
|
|
||||||
getGlobalIsStarting,
|
|
||||||
setWasActive,
|
|
||||||
setWasInFg,
|
|
||||||
} from "./emain-activity";
|
|
||||||
import {
|
import {
|
||||||
delay,
|
delay,
|
||||||
ensureBoundsAreVisible,
|
ensureBoundsAreVisible,
|
||||||
@ -328,13 +322,6 @@ function getOrCreateWebViewForTab(fullConfig: FullConfigType, windowId: string,
|
|||||||
console.log("window-open denied", url);
|
console.log("window-open denied", url);
|
||||||
return { action: "deny" };
|
return { action: "deny" };
|
||||||
});
|
});
|
||||||
tabView.webContents.on("focus", () => {
|
|
||||||
setWasInFg(true);
|
|
||||||
setWasActive(true);
|
|
||||||
if (getGlobalIsStarting()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
tabView.webContents.on("blur", () => {
|
tabView.webContents.on("blur", () => {
|
||||||
handleCtrlShiftFocus(tabView.webContents, false);
|
handleCtrlShiftFocus(tabView.webContents, false);
|
||||||
});
|
});
|
||||||
@ -490,6 +477,8 @@ function createBaseWaveBrowserWindow(
|
|||||||
focusedWaveWindow = win;
|
focusedWaveWindow = win;
|
||||||
console.log("focus win", win.waveWindowId);
|
console.log("focus win", win.waveWindowId);
|
||||||
ClientService.FocusWindow(win.waveWindowId);
|
ClientService.FocusWindow(win.waveWindowId);
|
||||||
|
setWasInFg(true);
|
||||||
|
setWasActive(true);
|
||||||
});
|
});
|
||||||
win.on("blur", () => {
|
win.on("blur", () => {
|
||||||
if (focusedWaveWindow == win) {
|
if (focusedWaveWindow == win) {
|
||||||
|
Loading…
Reference in New Issue
Block a user