feature: notify newMessage if window is blurred or closed
This commit is contained in:
parent
95e73f7c28
commit
515f67a120
7 changed files with 34 additions and 18 deletions
|
|
@ -31,7 +31,7 @@ import ConnectionStatus from "./connectionStatus.vue";
|
|||
import { profile } from "@/render/shared/profile";
|
||||
import { messages } from "@/render/shared/messages";
|
||||
import useScroll from "@/render/composables/useScroll";
|
||||
import { postMessage } from "@/render/ipc";
|
||||
import { postMessage, postWindowFocus } from "@/render/ipc";
|
||||
|
||||
export default defineComponent({
|
||||
name: "Messenger",
|
||||
|
|
@ -46,6 +46,7 @@ export default defineComponent({
|
|||
setup() {
|
||||
|
||||
const onFocus = () => {
|
||||
postWindowFocus({ isFocused: true });
|
||||
postMessage({
|
||||
intent: "focus",
|
||||
params: { "focus": true },
|
||||
|
|
@ -55,6 +56,7 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
const onBlur = () => {
|
||||
postWindowFocus({ isFocused: false });
|
||||
postMessage({
|
||||
intent: "focus",
|
||||
params: { "focus": false },
|
||||
|
|
|
|||
Loading…
Reference in a new issue