Make application window appear even when its hidden underneath other apps (#5782)

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen authored and GitHub committed 2022-07-06 09:44:56 +03:00
1 parent 667053cdf5
commit 4d99a46dfe
4 files changed
+40

No files matched your search

@@ -0,0 +1,22 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import electronAppInjectable from "../electron-app.injectable";
const focusApplicationInjectable = getInjectable({
id: "focus-application",
instantiate: (di) => {
const electronApp = di.inject(electronAppInjectable);
return () => {
electronApp.focus({ steal: true });
};
},
causesSideEffects: true,
});
export default focusApplicationInjectable;