Skip to content

Commit

Permalink
fix(renderer): fix macos bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Su-Yong committed Jan 16, 2025
1 parent 1e080d1 commit 4b3654b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/window/lyric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
} from '../../common/constants';
import { getFile } from '../../utils/resource';
import presetThemes from '../../common/presets';
import { isMacOS, isWin32 } from '../../utils/is';

const iconPath = getFile('./assets/icon_square.png');
const LYRIC_WINDOW_OPTIONS = {
Expand Down Expand Up @@ -71,8 +72,8 @@ export class LyricWindowProvider
Menu.setApplicationMenu(null);

this.window.setTitle(`Alspotron: ${config.get().views[index].name}`);
this.window.setThumbnailClip(this.getWindowRect());
this.window.setAlwaysOnTop(true, 'main-menu', 1);
if (isWin32()) this.window.setThumbnailClip(this.getWindowRect());
this.window.setAlwaysOnTop(true, isMacOS() ? 'screen-saver' : 'main-menu', 1);
this.window.setVisibleOnAllWorkspaces(true, {
visibleOnFullScreen: true,
});
Expand Down Expand Up @@ -171,7 +172,7 @@ export class LyricWindowProvider
this.window.setSize(windowRect.width, windowRect.height);
this.window.setResizable(resizable);
this.window.setPosition(windowRect.x, windowRect.y);
this.window.setThumbnailClip(windowRect);
if (isWin32()) this.window.setThumbnailClip(windowRect);
}

private getStyle() {
Expand Down

0 comments on commit 4b3654b

Please sign in to comment.