Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Commit

Permalink
fix(window): fix 'minimize window' button on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
herteleo committed Sep 13, 2022
1 parent a84a278 commit dbeae56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/background/create-main-window.js
Expand Up @@ -96,6 +96,10 @@ export const createMainWindow = () => {
else window.maximize();
});

ipc.answerRenderer('app-minimize', () => {
window.minimize();
});

window.on('focus', () => {
ipc.callRenderer(window, 'app-has-focus', true);
});
Expand Down
5 changes: 4 additions & 1 deletion src/components/WindowControls.vue
Expand Up @@ -3,7 +3,7 @@
<title-bar-button
schema="gray"
title="Minimize window"
@click="window.minimize()"
@click="minimizeWindow"
>
<span :class="$style.icon">&#xE921;</span>
</title-bar-button>
Expand Down Expand Up @@ -46,6 +46,9 @@ export default {
closeWindow() {
ipc.callMain('app-close');
},
minimizeWindow() {
ipc.callMain('app-minimize');
},
toggleMaximized() {
ipc.callMain('app-toggle-maximized');
},
Expand Down

0 comments on commit dbeae56

Please sign in to comment.