Skip to content

Commit

Permalink
Merge pull request #1334 from ipy/develop
Browse files Browse the repository at this point in the history
feat(streaming): focus streaming window
  • Loading branch information
ipy authored Aug 11, 2020
2 parents 2432c45 + 03037c3 commit 225dc83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,10 @@ function createPaymentWindow(url, orderID, channel) {
}

function createLosslessStreamingWindow() {
if (losslessStreamingWindow && !losslessStreamingWindow.webContents.isDestroyed()) {
losslessStreamingWindow.focus();
return;
}
const losslessStreamingWindowOptions = {
frame: false,
titleBarStyle: 'none',
Expand Down Expand Up @@ -833,6 +837,7 @@ function createLosslessStreamingWindow() {
}
losslessStreamingWindow.once('ready-to-show', () => {
losslessStreamingWindow.show();
losslessStreamingWindow.focus();
});
if (process.platform === 'win32') {
hackWindowsRightMenu(losslessStreamingWindow);
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/components/LosslessStreaming.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default Vue.extend({
const width = Math.ceil(content.offsetWidth);
const height = Math.ceil(content.offsetHeight);
remote.getCurrentWindow().setSize(width, height);
}, 100);
}, 300);
},
handleClose() {
const win = remote.BrowserWindow.getFocusedWindow();
Expand Down Expand Up @@ -194,7 +194,7 @@ export default Vue.extend({
margin: 40px auto 0;
}
.info {
font-size: 16px;
font-size: 14px;
color: rgba(255, 255, 255, 0.7);
line-height: 1.75em;
&>div {
Expand All @@ -209,7 +209,7 @@ export default Vue.extend({
}
.file {
.title {
font-size: 16px;
font-size: 14px;
margin-bottom: 5px;
color: rgba(255, 255, 255, 0.7);
}
Expand Down

0 comments on commit 225dc83

Please sign in to comment.